
April 20th, 2012, 01:22 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 1
Time spent in forums: 23 m 40 sec
Reputation Power: 0
|
|
|
Other - Mysql regex to find fixed lenght words
I'm trying to find words of four letters from a given set using the next syntax:
Code:
SELECT * FROM words WHERE word REGEXP '^[dcqaahii]{4}$'
and it returns words with just four letters as desired, but the question it's that i do not know how to avoid the regex use one letter more than once. the result returns words with two 'c' and in the set there is only one, so it's not a valid word.
Is there anything I can include for avoiding it?
Thanks in advance.
|