Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: how to select which words have Y and W

by Laurent_R (Abbot)
on Dec 26, 2013 at 12:19 UTC ( #1068429=note: print w/replies, xml ) Need Help??


in reply to how to select which words have Y and W

For your initial question, if you want words having both y and w, a character class or alternation is not sufficient. Try two regexes:
$ perl -e 'print join " ", grep { /y/ and /w/} ('red', 'cyan', 'yello +w', 'blue' )' yellow

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2016-08-31 07:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (427 votes). Check out past polls.