Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: pick a word contaning reg-ex

by Kenosis (Priest)
on Dec 04, 2012 at 16:19 UTC ( #1007113=note: print w/ replies, xml ) Need Help??


in reply to pick a word contaning reg-ex

And another option:

use Modern::Perl; while (<DATA>) { say $1 while /(\S+!)/g; } __DATA__ Mary had a little lamb! , whose fleece! was white! as snow. And everywhere! that Mary went, the lamb was sure! to go.

Output:

lamb! fleece! white! everywhere! sure!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2016-07-26 13:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (235 votes). Check out past polls.