这不是漂亮或简短,但它很简单。
SELECT word
FROM tabl
WHERE
-- assuming case sensitive based on your example
(word LIKE '%[Aa]%[Aa]%' AND word NOT LIKE '%[Aa]%[Aa]%[Aa]%')
OR
(word LIKE '%[Ee]%[Ee]%' AND word NOT LIKE '%[Ee]%[Ee]%[Ee]%')
OR
(word LIKE '%[Ii]%[Ii]%' AND word NOT LIKE '%[Ii]%[Ii]%[Ii]%')
OR
(word LIKE '%[Oo]%[Oo]%' AND word NOT LIKE '%[Oo]%[Oo]%[Oo]%')
OR
(word LIKE '%[Uu]%[Uu]%' AND word NOT LIKE '%[Uu]%[Uu]%[Uu]%')
我突然想到,对于一个有两个一个元音和三个另一个元音的地方,您没有指定要做什么。这符合条件吗?如果不是(Alaska StatE PEak Park
即使里面正好有 2 个 E,说也很糟糕),那么你可能想要这个:
SELECT word
FROM tabl
WHERE
-- assuming case sensitive based on your example
( word LIKE '%[Aa]%[Aa]%'
OR word LIKE '%[Ee]%[Ee]%'
OR word LIKE '%[Ii]%[Ii]%'
OR word LIKE '%[Oo]%[Oo]%'
OR word LIKE '%[Uu]%[Uu]%'
)
AND word NOT LIKE '%[Aa]%[Aa]%[Aa]%'
AND word NOT LIKE '%[Ee]%[Ee]%[Ee]%'
AND word NOT LIKE '%[Ii]%[Ii]%[Ii]%'
AND word NOT LIKE '%[Oo]%[Oo]%[Oo]%'
AND word NOT LIKE '%[Uu]%[Uu]%[Uu]%'