Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: how to select which words have Y and W

by Laurent_R (Parson)
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


Comment on Re: how to select which words have Y and W
Download Code

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 romping around the Monastery: (9)
As of 2014-12-25 20:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls