You're trying to match 2 digits after 'INT' --> {2}
This means there must be exactly 2 of the previous entity,
but you only have 1digt -> '5' !!!
Michael
Am Sonntag, 20. Juli 2003 02:50 schrieb Jerry Preston:
> Hi!
>
> I know this is not as hard to do, but I do not seem to see the result:
>
>
Hello,
the problem is, that your regex doesnt seach at beginning or end (for a split a not so
good idea anyway),
but it is a negated character class because of the square brackets and the circumflex
as the first character in it.
It uses any non-word character, apostrophe, '-' or '$' to split th
> Combining John's answer and a variant of Michael's:
>
>
>
> my $str = q/aw bcdefaw e a rt zzz kjkjkjaw qa/;
>
> print "$str\n";
>
> # Look for a string
>
> $str =~ s/
> (?<=aw) # Preceded by 'aw'
> ((?!aw).)*? # Not containing 'aw'
> (?=zzz) # followed by 'zzz'
>
Damn...
switch the negative lookahead with the point
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
If you want want to replace everything between the innermost occurrence of "aw ???
zzz" you may try this
$str =~ s/aw.*?(?!aw)zzz/awTXTzzz/;
the '.*?(?!aw)' takes care that between 'aw' and 'zzz' anything but 'aw' will match.
Schirr
> if I have
> my $str = 'aw bcdefaw e a rt zzz kjkjk
Hi,
the "\1" in your Regex stands for repetition of a former match which you
catched in the same Regex, but in your case there isn't one.
You didn't descibe what you really want to match, in case you want these
digits try this:
m/\.123\.222/
if you just want 3 digits with a dot in front just r