Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: how to select which words have Y and W

by Laurent_R (Prior)
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 drinking their drinks and smoking their pipes about the Monastery: (12)
As of 2015-07-06 17:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (80 votes), past polls