Search in files/folders for files containing two strings using regular expressions
Posted: 13.09.2017, 12:36
Hi,
I have been googling through different forums to find out on how I can find two strings in containing text in a list of data files.
It's apparently fairly easy to find them with the OR function as this is merely done with a |, eg (String1|String2).
However I want to find only files which contain both strings in them, but the AND function seems to be more complex to set up as regular expression. I have found examples (eg https://stackoverflow.com/questions/469 ... d-operator) mentioning that (?=String1)(?=String2) should work at least in Perl/Java, but I couldn't make it work in FreeCommander.
Which brings me back to the original question: How to find files which contain two specific strings using regular expressions?
Thanks in advance.
I have been googling through different forums to find out on how I can find two strings in containing text in a list of data files.
It's apparently fairly easy to find them with the OR function as this is merely done with a |, eg (String1|String2).
However I want to find only files which contain both strings in them, but the AND function seems to be more complex to set up as regular expression. I have found examples (eg https://stackoverflow.com/questions/469 ... d-operator) mentioning that (?=String1)(?=String2) should work at least in Perl/Java, but I couldn't make it work in FreeCommander.
Which brings me back to the original question: How to find files which contain two specific strings using regular expressions?
Thanks in advance.