in reply to Regular expression question
Another way.
$re = qr[ ( the(?{$rep='The'}) | quick(?{$rep='Quick'}) | brown(?{$rep='Brown'}) | fox(?{$rep='Fox'}) ) ]x; $s = 'the quick brown fox'; $s =~ s[$re][$rep]g; print $s; The Quick Brown Fox
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Regular expression question
by demerphq (Chancellor) on Jan 15, 2004 at 23:27 UTC | |
by BrowserUk (Patriarch) on Jan 15, 2004 at 23:45 UTC |