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

(MeowChow) Re: Matching Words

by MeowChow (Vicar)
on May 23, 2002 at 06:15 UTC ( #168677=note: print w/replies, xml ) Need Help??


in reply to Matching Words

Pick your poison:
  
perl -pe 's/\W*(\w+).*\W(\w+)\W*/$1 $2/' perl -ple '/(\w+).*(\b\w+)/;$_="$1 $2"' perl -ple '$_=join$",/(\w+).*(\b\w+)/' perl -ple '$_="@{[(/\w+/g)[0,-1]]}"' perl -ple '$_=join$",(/\w+/g)[0,-1]' perl -ple '@w=/\w+/g;$_="@w[0,-1]"' perl -pe '@w=/\w+/g;s/.*/@w[0,-1]/' # my personal favorite cat -n|perl -plaF\\W+ -e '$_="@F[2,-1]"'
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://168677]
help
Chatterbox?
[thao4]: I seach to do that since a week but I can't found the answer in google. Thank for your help
[Eily]: hello thao4 (and hello all :D), you should [id://http:// perlmonks.org/ index.pl?node_id= 479#post|open a question on Seekers of Perl Wisdom], be sure to include whatever you have tried that didn't work, or only does the job partially
[thao4]: yes, I do a little perl since some years but not fréquently, I can correct the triggers in Clearcase of IBM, but write the code : no
[Eily]: meh, such good link ...
[Eily]: here
[Eily]: still not xD there

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2018-02-21 09:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (276 votes). Check out past polls.

    Notices?