Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Pattern matching: Why no \1 in [ ]?

by MarkM (Curate)
on Aug 07, 2003 at 19:46 UTC ( #282010=note: print w/ replies, xml ) Need Help??


in reply to Pattern matching: Why no \1 in [ ]?

\1 provides the ability to substitute the literal text string of a previously matched parameter into the regular expression. It doesn't give you the ability to recompile the regular expression. Character class ([...]) are a compile time directive. \1 is a run time directive. [\1] is interpretted as 'the character with value 1'.


Comment on Re: Pattern matching: Why no \1 in [ ]?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (12)
As of 2015-07-29 17:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (266 votes), past polls