in reply to Re^2: Need a Regular Expression that tests for words in different order and captures the values found.
in thread Need a Regular Expression that tests for words in different order and captures the values found.
$line =~ /(?=.*\bfred\s+(\w+)/ ; # would get "fred" and anything "-fred" # how would I avoid that?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Need a Regular Expression that tests for words in different order and captures the values found.
by AnomalousMonk (Archbishop) on Jan 15, 2010 at 18:04 UTC | |
|
Re^4: Need a Regular Expression that tests for words in different order and captures the values found.
by ikegami (Patriarch) on Jan 15, 2010 at 18:04 UTC |