in reply to One-liner to fix LaTeX quotation marks
see http://perldoc.perl.org/perlretut.html#Looking-ahead-and-looking-behind
DB<100> $txt=q( This is "an example", but "`this not"'. ) => " This is \"an example\", but \"`this not\"'. " DB<101> $txt =~ s/"(?![`'])/'/g => 2 DB<102> $txt => " This is 'an example', but \"`this not\"'. "
but you might get bitten by shell escaping if you try a one-liner
Cheers Rolf
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: One-liner to fix LaTeX quotation marks
by tim_the_monk (Initiate) on Oct 14, 2012 at 19:56 UTC |