in reply to Re^3: Match a pattern only if it is not within another pattern
in thread Match a pattern only if it is not within another pattern
$str =~ s[(bar.+?qux)|(qux.+?bar)|(foo)][defined $3 ? '123' : (defined +($2) ? $2 : $1)]ge;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Match a pattern only if it is not within another pattern
by BrowserUk (Patriarch) on Aug 17, 2005 at 17:40 UTC | |
by Transient (Hermit) on Aug 17, 2005 at 17:50 UTC |