in reply to Passing a regex from a CGI HTML form
OK, is this any better?:
if (length ($request{'find'}) > 0 ) { $find=$request{'find'}; $replace=$request{'replace'}; while ($line =~ m{(.*)$find(.*)}){ $line = $1 . $replace . $2; } }
Nick
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Passing a regex from a CGI HTML form UPDATE
by hippo (Archbishop) on Sep 04, 2016 at 12:06 UTC | |
by Linicks (Scribe) on Sep 04, 2016 at 13:04 UTC |