Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Re: A Regex to identify Regex's / Compiling a regex

by bart (Canon)
on Sep 19, 2002 at 22:41 UTC ( [id://199328]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: A Regex to identify Regex's / Compiling a regex
in thread A Regex to identify Regex's / Compiling a regex

At this point it's mostly a matter of curiousity but an interesting anomaly within either the eval function or the Perl regex engine.
It's not. It's just that you're trying to match a backslash, for which you need a double backslash in the regex. But to achieve that, you need to type 4 backslashes in a singlequotish string. It's what's in the string that matters for the regex engine, not what's in your source code.

A backslash only disappears in such a string, if it's in front of a backlslash or a string delimiter (here "'").

  • Comment on Re: Re: Re: A Regex to identify Regex's / Compiling a regex

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-24 05:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found