|laziness, impatience, and hubris|
Re: better way to escape escapes (updated)by LanX (Bishop)
|on Apr 16, 2014 at 01:09 UTC||Need Help??|
Would be easier if you provided sample data.
The basic idea is to use or conditions, which match first an escaped sequence, secondly a directive and then a single character.
With a /g modifier within a while condition the match will start where the last one ended.
Group only on your directives.
2 proofs of concept:
The second one w/o while loop.
Please notice that you need to check for defined, since every escape or single character is an empty (since ungrouped) match.
( addicted to the Perl Programming Language)