Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Matching strings with non-word characters

by Tanktalus (Canon)
on Apr 17, 2006 at 13:19 UTC ( [id://543809]=note: print w/replies, xml ) Need Help??


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.)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://543809]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-19 14:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found