in reply to Regex: Changing $1
P.S. You can make a one liner out of thisopen (FH,"test.test") or die; while(<FH>) { if ($_ =~ /"(.+?)"/) { print "Matched: $1\n"; s/$1/New string/; } print; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex: Changing $1
by hdb (Monsignor) on Sep 04, 2013 at 14:39 UTC | |
|
Re^2: Regex: Changing $1
by choroba (Cardinal) on Sep 04, 2013 at 14:36 UTC |