Jaap has asked for the wisdom of the Perl Monks concerning the following question:
Searches for all entries that have both 'bill' AND 'clinton' in the entrystring (which contains name, alias, room# etc)TelSearch.pl bill clinton
Needs to find the same entries asTelSearch.pl bill clinton
I currently use something like this:TelSearch.pl clinton bill
my $flag = 1; foreach (@ARGV) { if ($entry !~ m/\Q$_\E/) { $flag = 0; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regexp match arg1 AND arg2
by broquaint (Abbot) on Feb 17, 2003 at 15:19 UTC | |
by Jaap (Curate) on Feb 17, 2003 at 16:32 UTC | |
|
Re: regexp match arg1 AND arg2
by Limbic~Region (Chancellor) on Feb 17, 2003 at 15:33 UTC | |
by Jaap (Curate) on Feb 17, 2003 at 16:29 UTC | |
by Limbic~Region (Chancellor) on Feb 17, 2003 at 16:35 UTC | |
|
Re: regexp match arg1 AND arg2
by hv (Prior) on Feb 17, 2003 at 17:36 UTC | |
by Jaap (Curate) on Feb 18, 2003 at 11:27 UTC | |
|
Re: regexp match arg1 AND arg2
by zengargoyle (Deacon) on Feb 17, 2003 at 17:58 UTC |