Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
How to find 1-3 matches per line, no matter in which order the words are.
Line from flatfile:
FALCHE;12;ff;20020101;Pori;Yyteri;lietteet;testi;kylmaI have tried following code to search matches.
if (($hdata =~/$crit1/ig) && ($hdata =~/$crit2/ig) && ($hdata =~/$crit3/ig)) { print "$hdata<br>"; }
Problem is the order. If I search "pori and yyteri" I get fifferent resuts than with "yyteri and pori".
What should I do?
PH
Edited: ~Thu Aug 1 14:02:19 2002 (GMT) by footpad: Added <code> and other HTML formatting tags.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Finding multiple words from a line of flatfile
by Bilbo (Pilgrim) on Aug 01, 2002 at 12:53 UTC | |
|
Re: Finding multiple words from a line of flatfile
by Abigail-II (Bishop) on Aug 01, 2002 at 12:50 UTC | |
|
Re: Finding multiple words from a line of flatfile
by Basilides (Friar) on Aug 01, 2002 at 15:47 UTC | |
by Anonymous Monk on Aug 01, 2002 at 17:10 UTC |