10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I have the below array
my @actionText = ("delivered to governor on 21/23/3345" , "deliver jllj" , "ram 2345/43");
When i am trying to grep the contents of array and if mathced substituting with the digitis or some date format from the element like below
my @action = grep { $_ =~... (7 Replies)
Discussion started by: ragilla
7 Replies
2. Programming
Hi all,
How am I read a file, find the match regular expression and overwrite to the same files.
open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat";
open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat";
while (<DESTINATION_FILE>)
{
# print... (1 Reply)
Discussion started by: jessy83
1 Replies
3. Shell Programming and Scripting
Hi I am doing something basic like...
if ($stringvariable =~ /have not typed/)
I have a little problem because the 'not' in the expression gets highlighted as a kind of a '!'..what am I supposed to do in this situation?
Thank you
---------- Post updated at 03:24 PM ----------... (1 Reply)
Discussion started by: vas28r13
1 Replies
4. Shell Programming and Scripting
I am completely new to perl programming. My father is helping me learn said programming language. However, I am stuck on one of the assignments he has given me, and I can't find very much help with it via google, either because I have a tiny attention span, or because I can be very very dense.
... (4 Replies)
Discussion started by: kittyluva2
4 Replies
5. Shell Programming and Scripting
Could you help me with this please. This regular expression seems to match for the wrong input
#!/usr/bin/perl
my $inputtext = "W1a$%XXX";
if($inputtext =~ m/+X+/)
{
print "matches\n";
}
The problem seems to be %. if inputtext is W1a$XXX, the regex doesnot match.... (5 Replies)
Discussion started by: suppandi7
5 Replies
6. Shell Programming and Scripting
Hi,
I need and expression for a word like abc_xyz_ykklm
The expresion should indicate that the word starts with abc and end with ykklm but does not contain xyz string in the middle.
Example: abc_tmn_ykklm is ok and abc_xyz_ykklm is not Ok.
Please help.
Regards. (1 Reply)
Discussion started by: asth
1 Replies
7. Shell Programming and Scripting
Dear all,
I have a simple issue on a perl regular expression. I want to get the characters in red from the next lines :
POWER_key
LEFT_key
RIGHT_key
OK_key
DOWN_key
and so on...
Thanks in advance for reply.
Ludo (1 Reply)
Discussion started by: lsaas
1 Replies
8. Shell Programming and Scripting
Hello all,
I need to match the red expressions in the following lines :
MACRO_P+P-_scrambledServices_REM_PRC30.xml
MACRO_P+P-_scrambledServices_REM_RS636.xml
MACRO_P+P-_scrambledServices_REM_RS535.xml
and so on...
Can anyone give me a PERL regular expression to match those characters ?
... (5 Replies)
Discussion started by: lsaas
5 Replies
9. Shell Programming and Scripting
hi,
i want to extract the sessionID from this line.
QnA Session Id :
here the output should be--
QnA_SessionID=128589
Thanks
NT (3 Replies)
Discussion started by: namishtiwari
3 Replies
10. Shell Programming and Scripting
Hi all,
I am trying to match a multi line string and return the matching string in one line. Here is the perl code that I wrote:
#!/usr/bin/perl
my $str='<title>My
title</title>';
if ($str =~ /(<title>)(+)(<\/title>)/ ){
print "$2\n";
}
It returns :
My
title
I want the... (3 Replies)
Discussion started by: sdubey
3 Replies
PCRELIMITS(3) Library Functions Manual PCRELIMITS(3)
NAME
PCRE - Perl-compatible regular expressions
SIZE AND OTHER LIMITATIONS
There are some size limitations in PCRE but it is hoped that they will never in practice be relevant.
The maximum length of a compiled pattern is approximately 64K data units (bytes for the 8-bit library, 32-bit units for the 32-bit library,
and 32-bit units for the 32-bit library) if PCRE is compiled with the default internal linkage size of 2 bytes. If you want to process reg-
ular expressions that are truly enormous, you can compile PCRE with an internal linkage size of 3 or 4 (when building the 16-bit or 32-bit
library, 3 is rounded up to 4). See the README file in the source distribution and the pcrebuild documentation for details. In these cases
the limit is substantially larger. However, the speed of execution is slower.
All values in repeating quantifiers must be less than 65536.
There is no limit to the number of parenthesized subpatterns, but there can be no more than 65535 capturing subpatterns.
There is a limit to the number of forward references to subsequent subpatterns of around 200,000. Repeated forward references with fixed
upper limits, for example, (?2){0,100} when subpattern number 2 is to the right, are included in the count. There is no limit to the number
of backward references.
The maximum length of name for a named subpattern is 32 characters, and the maximum number of named subpatterns is 10000.
The maximum length of a name in a (*MARK), (*PRUNE), (*SKIP), or (*THEN) verb is 255 for the 8-bit library and 65535 for the 16-bit and
32-bit library.
The maximum length of a subject string is the largest positive number that an integer variable can hold. However, when using the tradi-
tional matching function, PCRE uses recursion to handle subpatterns and indefinite repetition. This means that the available stack space
may limit the size of a subject string that can be processed by certain patterns. For a discussion of stack issues, see the pcrestack docu-
mentation.
AUTHOR
Philip Hazel
University Computing Service
Cambridge CB2 3QH, England.
REVISION
Last updated: 04 May 2012
Copyright (c) 1997-2012 University of Cambridge.
PCRE 8.30 24 June 2012 PCRELIMITS(3)