in reply to Pattern matching: Why no \1 in [ ]?
If $1 only has one character in it, then sure, you can do /(.)(?!\1)(?s:.)\1/ as was suggested. But if it's got more than one character, I think the "easiest" way is with the dynamic-regex assertion: /(.)(??{ "[^\Q$1\E]" })\1/.
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perl
hacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
|
|---|