Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Return value from a binding operator?

by dsheroh (Parson)
on Apr 13, 2013 at 09:50 UTC ( #1028499=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Return value from a binding operator?
in thread Return value from a binding operator?

The ^ metacharacter has different meanings in different parts of a regex.

Normally, it does mean "start of line", as you thought. If the regex were m!^/!, then it would match lines beginning with /.

However, as the first character in a character class, it negates the class, so [^/] means "match any character except /". (But, again, that's only if it's the first character in the class - [/^] means "match either a / or a ^". And [^/^] would match any character except those two.)


Comment on Re^3: Return value from a binding operator?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2014-10-31 11:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (216 votes), past polls