in reply to Re^2: 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.

... I was able to get it to work(sortof) ...

This implies the solution does not entirely fulfill your needs. In what way does it fall short?

  • Comment on Re^3: Need a Regular Expression that tests for words in different order and captures the values found.

Replies are listed 'Best First'.
Re^4: Need a Regular Expression that tests for words in different order and captures the values found.
by greatwazzoo (Novice) on Jan 15, 2010 at 19:35 UTC
    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.