Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: help in understanding a regex

by 2teez (Priest)
on Nov 16, 2012 at 22:56 UTC ( #1004258=note: print w/replies, xml ) Need Help??


in reply to help in understanding a regex

with $string =~ m/[^/]+)$/; using strict and warnings, you would get unmatched error [ in regex ...
Please note the usage of the "/" as the delimiter,
which you have to "escape" to use within the m// like so: $string =~ m/[^\/]+)$/;
Please check the subtitle m/PATTERN/msixpodualgc under Regexp-Quote-Like-Operators

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1004258]
help
Chatterbox?
[perldigious]: w4st3 n0t w0t n0t
thezip is randomly reminded of Hugo's_house_of_ho rrors

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (14)
As of 2017-03-24 18:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (305 votes). Check out past polls.