Just can't quite figure this one out.

Given a search phrase like "one two three", I want to search a list of 
text strings for onex that contain ALL of those words, but not 
necessarily in that order.

The hard part for me is the "not necessarily in that order".

Using '\b(one|two|three)\b' will match if at least one of them occurs in 
any order, but I need all of them to match *and* be in any order.

two one three => match
one three => does not match

Any ideas?  Is this possible with regular expressions?

Thanks!
Jeff



-- 
Posted via http://www.ruby-forum.com/.