| 
	
 | 
 Posted by lister on 02/23/07 12:22 
On Feb 23, 11:59 am, "willl69" <will...@gmail.com> wrote: 
> Hi, 
> 
> Just wondering if anybody can help me out with a regular expression. 
> 
> What i need to do is match a sting of 5+ words, with the words in any 
> order.  The below will perform the operation - 
> 
> ^(word1|word2|word3|word4|word5)+$ 
> 
> Although this works, this will also match alot of stuff that contains any 
> of those words, not contains all the words, which is what i need. 
> 
> Any info greatly appreciated, i can ellaborate on the problem if needed, 
> 
> Cheers 
> 
> Will 
 
^(word1|word2|word3|word4|word5){5}$ 
 
Will require 5 words, but this will still let your user enter the same 
word 5 times. Do you need an instance of all 5 words?
 
  
Navigation:
[Reply to this message] 
 |