daveatmcafee has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
I want to match two words in a filename but in any order. I am using the code:
if (($zipFile =~ /this/i) && ($zipFile =~ /that/)) {
# do something
}
But I suspect there is a better way than using the &&. Any ideas?
Thanks,
Dave
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: pattern matching words in any order
by ikegami (Patriarch) on Oct 23, 2009 at 16:34 UTC | |
Re: pattern matching words in any order
by BrowserUk (Patriarch) on Oct 23, 2009 at 16:34 UTC | |
by grizzley (Chaplain) on Oct 26, 2009 at 08:53 UTC | |
Re: pattern matching words in any order
by CountZero (Bishop) on Oct 23, 2009 at 16:29 UTC | |
by ww (Archbishop) on Oct 23, 2009 at 19:01 UTC | |
Re: pattern matching words in any order
by johngg (Canon) on Oct 23, 2009 at 20:17 UTC | |
Re: pattern matching words in any order
by SuicideJunkie (Vicar) on Oct 23, 2009 at 19:02 UTC | |
Re: pattern matching words in any order
by ikegami (Patriarch) on Oct 26, 2009 at 13:38 UTC |
Back to
Seekers of Perl Wisdom