in reply to Re: Regex: matching character which happens exactly once
in thread Regex: matching character which happens exactly once
I understand that the [^\1] regex expression presented here is intended as pseudocode, but in addition to the radical changes to backrferencing it implies, there's another problem: the syntax of character classes would have to change radically to support it. Something like \1 in a character class is compiled as an octal character representation:
c:\@Work\Perl\monks>perl -wMstrict -le "my $rx = qr{ [\1] }xms; print $rx; print 'match' if qq{\cA} =~ $rx; " (?msx-i: [\1] ) match
Give a man a fish: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Regex: matching character which happens exactly once
by QM (Parson) on Oct 24, 2017 at 09:16 UTC | |
by AnomalousMonk (Archbishop) on Oct 24, 2017 at 16:51 UTC |