in reply to In place replace, ignoring between quotes
DB<151> $str=$str0 => " bla0 \"ignore a1\" bla1 \"ignore a2\" bla2" DB<152> $str =~ s/("[^"]*?"|a)/ $1 eq "a" ? "A" : $1 /ge => 5 DB<153> $str => " blA0 \"ignore a1\" blA1 \"ignore a2\" blA2"
Cheers Rolf
( addicted to the Perl Programming Language)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: In place replace, ignoring between quotes (one regex)
by LanX (Saint) on Oct 25, 2013 at 21:41 UTC |