Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^4: regex not matching special char

by mnooning (Sexton)
on Dec 14, 2012 at 12:33 UTC ( #1008828=note: print w/ replies, xml ) Need Help??


in reply to Re^3: regex not matching special char
in thread regex not matching special char

Thanks for the tip on YAPE::Regex::Explain.

As kennethk pointed out - reading between the lines - the key is to know that a back slashed special character will not be taken as a word character, and hence will be seen as a word boundary itself. That is why the simple \b does not work.

Armed with a definitive answer as to what is happening, a simple work around can be constructed. In my case the strings I am looking for are actual directory names. I can split on the directory separator.

Thanks again.


Comment on Re^4: regex not matching special char

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (12)
As of 2014-07-30 11:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (230 votes), past polls