- or download this
/\x26\x67(?!\x26\x67)(.(?!\x26\x67)){6}.{2}/s
- or download this
perl -le 'print for map { /ab(?!ab)(.(?!ab)){2}.{2}/s ? $& : () } @AR
+GV' abhjabdf abasdasd abdasdadsab ababblah
OUTPUTS:
abasda
abdasd
abblah
- or download this
/
\x26\x67 # Starting sequence (let's call it AB)
...
# note we know they're not AB because otherwise the
# (N-2)th item in the previous part wouldn't have mat
+ched
/sx # Enable comments, and make . mean everything
- or download this
my $marker = '&g';
my $N = 8;
my $n1 = $N-2;
/$marker(?!$marker)(?:.(?!$marker)){$n1}.{2}/s