EX:
SELECT DISTINCT city
FROM station
WHERE CITY REGEXP '^[aeiou].*[aeiou]$'
EX:
SELECT DISTINCT city
FROM station
WHERE CITY REGEXP '^[aeiou].*[aeiou]$'
This is a Regular Expression (Regex for short).
It is a more or less simple way of performing very complex and versatile searches over text.
In this case, the dot (.
) means "any character", and the asterisk (*
) means "any times", from none to "infinite".
So, any of thouse examples whould be a positive match (any number of any characters, including no charachter):
ae
afu
adfo
efhhha
ahjhjfgjdha
azdgsdfhshsdfgsu
(etc)..
The following web gives a nice visual explanation of regexs: https://www.dcode.fr/regular-expression-analyser