How do I write a regular expression to match two given strings, at any position in the string?
For example, if I am searching for cat
and mat
This works for searching files that contain both String1 and String2
(((.|\n))String1((.|\n))String2)|(((.|\n))String2((.|\n))String1)
Match any number of characters or line fields followed by String1 followed by any number of characters or line fields followed by String2 OR Match any number of characters or line fields followed by String2 followed by any number of characters or line fields followed by String1