DB<26> x q(It's\ ) 0 'It\'s\\ ' DB<27> x quotemeta q(It's\ ) 0 'It\\\'s\\\\\\ ' ... DB<29> x quotemeta q(It's\x) 0 'It\\\'s\\\\x'
FWIW you can write a regex which consumes every paired backslash in an or'ed condition before replacing single quotes/backslashes.
But a real test-cases are imperative here.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
this shows that the input format should be well defined too
DB<37> dd quotemeta q(It's\x\\) "It\\'s\\\\x\\\\"
In reply to Re^3: How to escape single quote(s) without the use of quotemeta
by LanX
in thread How to escape single quote(s) without the use of quotemeta
by thanos1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |