in reply to match longest sequence in an "or" RE
Please show more of your code. The following works for me as you seem to want:
> perl -wle "$_='foo s f pl bar';print for /^.+(s m e f|s f pl|s f).+$ +/;" s f pl
Most likely, $line does not contain what you think it contains, or maybe there is nothing after s f pl in your input string.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: match longest sequence in an "or" RE
by AnomalousMonk (Archbishop) on Sep 24, 2011 at 19:23 UTC | |
|
Re^2: match longest sequence in an "or" RE
by silentius (Monk) on Sep 24, 2011 at 16:54 UTC |