Re: regexp
On Jan 31, 4:04 pm, orya...@xxxxxxxxx (Oryann9) wrote:
In this regexp
my $regexp = qr/(\d+\x3a1108
|\w+\x3a1108{1,} ) /;
vs.
my $regexp1 = qr/(\d+\x3a1108
|\w+\x3a1108){1,} /;
does the {1,} construct outside the parens () mean the entire string 1 or more times
Yes, {1,} is just a long-winded way of saying +
and within the parens mean only the last string \x3s1180 1 or more times?
No, not the whole string, just the last character, which is 8 (not 0
because the string is \x3a1108 not \x3s1180).
.
Relevant Pages
- Re: regexp
... does the construct outside the parens mean the entire string 1 ... modifier is attached to the parentheses which will affect the entire contents ... (perl.beginners) - Re: another help
... characters (with a caveat around a newline depending on whether the //s switch is active at the time the regexp is encountered -- but that behavior will be the same between the two). ... Depending on the character string, it might also match, say, half of the string followed by the other half, or a quarter followed by the other three-fourths, etc etc. ... It is not just that it takes more time to type and to think about; it is that such an expression causes an extreme amount of backtracking when something subsequent to it fails to match in a regexp. ... (comp.lang.perl.misc) - Re: regexp
... does the construct outside the parens mean the entire string 1 ... modifier is attached to the parentheses which will affect the entire contents ... (perl.beginners) - Re: Trying to write my first Regexs
... If you wanted to match any string which contains a character that is ... that is not how to untaint stuff. ... Well, you want to design a regexp that will allow only what you want, ... (comp.lang.perl.misc) - Re: Regexp, ***= and subexpressions
... specified that the user's input be treated as a literal string rather than ... -exact] in cases where regexp isn't required:P ... Seems to be that regexp can't match word boundaries at "non-word" ... But now Earth has rotated and I can get back to sleep. ... (comp.lang.tcl) |
|