in reply to Matching strings with non-word characters

That's because \ is a special character. Thus, you need to escape it if you want it to appear literally. To escape it, just use a backslash - thus, you get m'X\\ '. Although I think the single-quote as a seperator is a bit wierd.

Replies are listed 'Best First'.
Re^2: Matching strings with non-word characters
by chas (Priest) on Apr 17, 2006 at 13:45 UTC
    Thanks! I used single quote as separator because I thought that would make the "\" not considered special. I guess that is wrong. (Using single quote prevents interpolation in patterns, though.)