Re: Regex - to simple to see?

2003-07-19 Thread Michael Pohl
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: > >

Re: null fields from split

2003-07-13 Thread Michael Pohl
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

Re: regular expression replacement

2003-07-12 Thread Michael Pohl
> 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' >

Re: regular expression replacement

2003-07-12 Thread Michael Pohl
Damn... switch the negative lookahead with the point -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: regular expression replacement

2003-07-12 Thread Michael Pohl
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

Re: RegEx stuff

2003-07-05 Thread Michael Pohl
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