Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Regex Help!

by daxim (Chaplain)
on Sep 19, 2013 at 09:22 UTC ( #1054817=note: print w/ replies, xml ) Need Help??

in reply to Regex Help!

You need to learn yourself how stuff works. You cannot bother other people all the time which you can trivially look up yourself in your learning materials or the official documentation.

my (@locations) = "Location: England Location: Scotland Location: Finland " =~ /Location: (\p{General_Category +=Letter}+)/gms; print $locations[0]; # England print $locations[1]; # Scotland print $locations[2]; # Finland
update: made \pL more explicit

Comment on Re: Regex Help!
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2015-08-03 21:46 GMT
Find Nodes?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...

    Results (56 votes), past polls