Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1054817]
help
Chatterbox?
[Lady_Aleena]: Discipulus, grep doesn't have an option to go recursively through a directory as far as I know.
[Your Mother]: I work remotely and my pay and benefits are quite nice. :P
[choroba]: Lady_Aleena Perl's grep is not related to directories
[Your Mother]: It does recurse.
[Lady_Aleena]: choroba, I know.
[Your Mother]: -R, -r, --recursive
[1nickt]: Discipulus, Corion, try this: D.A. Golden's blog
[Lady_Aleena]: Your Mother, that's the command line grep, not perl's grep.
[Your Mother]: …how on Earth could Perl’s grep recurse?
[Tanktalus]: perldigious: I'm not looking to get rich. I'm looking for interesting work, with good continuity of employment, and maintenance of our current lifestyle. (An improvement wouldn't be bad, either, but that's not a requirement ;) )

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2017-05-23 19:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?