in reply to Re^3: Need a Regular Expression that tests for words in different order and captures the values found.
in thread Need a Regular Expression that tests for words in different order and captures the values found.

it goes above and beyond in filling my needs
the "sortof" was meant that, the script that I'm bashing out isn't
actually looking for flintstones or rubbles, but parsing settings
from a config file, where the names of the settings arent in a
consistent order
e.g. I want "one two three" but most of the time all three are there
just in a random order
There was an article in The Perl Journal(I have the Oreilly book)
by Jeffrey Friedl that mentioned the
/^(?=.*one)(?=.*two)/
solution, but I didnt know how(or that you could) capture, inside
non consuming parenthesis.
  • Comment on Re^4: Need a Regular Expression that tests for words in different order and captures the values found.
  • Download Code