in reply to Look Behind issues
This approach is a variation on AnonyMonk's above:
c:\@Work\Perl>perl -wMstrict -le "use 5.010; ;; my $s = qq{Please;, read these&\x23xB0;, before you post 180;, if not + absolutely &\x23x2013;, sure.}; print qq{'$s'}; ;; my $entity = qr{ & [\x23] x [[:xdigit:]]+ ; }xms; ;; $s =~ s{ (?: $entity , (*SKIP) (*FAIL))? ; \K , }{}xmsg; print qq{'$s'}; " 'Please;, read these°, before you post 180;, if not absolutely &# +x2013;, sure.' 'Please; read these°, before you post 180; if not absolutely  +013;, sure.'
Some notes (update: now with more numbers for your indexing enjoyment):
Give a man a fish: <%-(-(-(-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Look Behind issues
by dominic01 (Sexton) on Mar 05, 2015 at 15:40 UTC |