Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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?
[ambrus]: Corion: really? Does that mean the Prima watcher objects behave as handles that stop the watcher when they're destroyed, just like AnyEvent expects?
[ambrus]: "all the bugs" -- hehe, good luck
[ambrus]: Corion: what I don't understand is, if you make a one-shot AnyEvent timer with short timeout, does this code guarantee that the Prima timer can't queue two timeout events before invoking any of them?
[ambrus]: Because that could break AnyEvent code, which is why I added a guard.
[ambrus]: (It might be easier to use the callback scalar as a guard, as in $c and &$c(); $c = ();)

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2016-12-09 08:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (149 votes). Check out past polls.