Using regexp to search for the string matching multiple words arranged in random.
- by t.sim
How can I write the regexp to match multiple words in random order?
For example, let's assume the following lines:
Dave Imma Car Pom Dive
Dive Dome Dare
Imma Car Ryan
Pyro Dave Imma Dive
Lunar Happy Dave
I want to search the string for the one matching "Dave" "Imma" and "Dive", expecting the 1st and 4th line. Is this possible?