in reply to Re: 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 =~ /^(?=.*fred\s+(\w+))(?=.*barney\s+(\w+))(?=.*joe\s+(\w+))/ ; $company = join '_', $1, $2, $3, 'inc';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Need a Regular Expression that tests for words in different order and captures the values found.
by AnomalousMonk (Archbishop) on Jan 15, 2010 at 17:19 UTC | |
by greatwazzoo (Novice) on Jan 15, 2010 at 19:35 UTC | |
|
Re^3: Need a Regular Expression that tests for words in different order and captures the values found.
by furry_marmot (Pilgrim) on Jan 15, 2010 at 15:42 UTC |