in reply to Strange regexp behavior

It is written in perlre that all characters inside a character class are interpreted literally. Slashes have no effect, so you can't backreference with them. Try putting a # char in there...

Update: Aim at foot... special escapes are respected. Hmmm. Backreferences within a character class would be interesting.

____________________
Jeremy
I didn't believe in evil until I dated it.

Replies are listed 'Best First'.
Re: Re: Strange regexp behavior
by wine (Scribe) on Mar 26, 2002 at 13:02 UTC
    Several people pointed out that [^\1] is not interpretated as I expected, i.e. "not the content of reference 1". But a \t is interpreted as a "tab", which you would expect. I guess a was fooled by that behavior.

    wine