Agent Ransack - Regular expression to find BOTH strings

  • Thread starter Thread starter PaulP
  • Start date Start date
P

PaulP

I want to be able to find files that have BOTH of my strings anywhere in
their names.
e.g. One string is 'cat', the other is 'dog'.
some-catfood.txt (should not match)
some-dogfood.txt (should not match)
some-cat-and-dogfood.txt (should match)

I understand (cat)|(dog) has the | 'or ' expression.
I need an 'and' expression.

Any help appreciated.
Paul
 
_PaulP_, venerdì 11/mar/2005:
I want to be able to find files that have BOTH of my strings anywhere in
their names.
e.g. One string is 'cat', the other is 'dog'.
some-catfood.txt (should not match)
some-dogfood.txt (should not match)
some-cat-and-dogfood.txt (should match)

I understand (cat)|(dog) has the | 'or ' expression.
I need an 'and' expression.

I don't have Agent Ransack, anyway this should work:

..*cat.*dog.*|.*dog.*cat.*
 
MLC said:
_PaulP_, venerdì 11/mar/2005:

.*cat.*dog.*|.*dog.*cat.*

That's perfect Maria. Thanks for your help!

Also thanks Donald, but cat & dog doesn't work in Agent Ransack.

Paul
 
Back
Top