in reply to Re: Re: RegEx Problem
in thread RegEx Problem
So this code will break[1]
But this is finemy $str = "foo bar baz quux"; $str =~ s<([a-z]+) (?{ s| \1|\L$&|; })><\U$1>xg;
$str =~ s<([a-z]+ ?)><local $_ = $1; s/$1/\U$&/g; $_>eg;
_________
broquaint
[1] in theory, I'll be happy to change it to a proper re-entrant regex if someone will provide me with one
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: RegEx Problem
by samtregar (Abbot) on May 29, 2002 at 15:29 UTC | |
by broquaint (Abbot) on May 29, 2002 at 18:17 UTC |