Re: Identifying words containing a specific substring in a sentence (was: a simple question)

2004-06-16 Thread Jeff 'japhy' Pinyan
On Jun 16, Kevin Zhang said: >One more question, how do I strip out all letters before "xyz". For the >original example, how would I get "xyzb" and "xyzd"? I would suggest this slightly modified grep(): my @matches = grep { /(xyz.*)/ and ($_ = $1) } split ' ', $string; Here, instead o

Re: Identifying words containing a specific substring in a sentence (was: a simple question)

2004-06-16 Thread Kevin Zhang
Thank you so much (and for the tip too). It works great! One more question, how do I strip out all letters before "xyz". For the original example, how would I get "xyzb" and "xyzd"? Thanks again, Kevin David Dorward <[EMAIL PROTECTED]> wrote: Tip: This is a beginners list, therefore many que

Identifying words containing a specific substring in a sentence (was: a simple question)

2004-06-16 Thread David Dorward
Tip: This is a beginners list, therefore many questions will be simple. Aim for more descriptive subject lines and life will be easier for users of the list archives. On 16 Jun 2004, at 17:10, Kevin Zhang wrote: For the following string: " axyzb cxyzd " What is the command to extrac