SQL中REGEXP的⽤法(RegularExpression正则表达式)
1、^ 查询以field开头的字符串leap day
SELECT*
FROM customers
WHERE last_name REGEXP'^field'
2、$ 查询以field结尾的字符串cristiano
SELECT*
FROM customers
WHERE last_name REGEXP'field$'
3、| 查询含有field或mac或ro结尾的字符串
SELECT*
FROM customers
多维度
WHERE last_name REGEXP'field|mac|ro'英译中在线翻译器
3、^ , | 查询以field开头或含有mac或ro的字符串
SELECT*
FROM customers
WHERE last_name REGEXP'^field|mac|ro'
4、$ , | 查询以field结尾或以mac结尾或含有ro的字符串
SELECT*
FROM customers
心口如一
WHERE last_name REGEXP'field$|mac$|ro'
tercel5、[ ] 查询含有‘ge’或‘ie’或‘me’的字符串
英文转换
SELECT*
FROM customers
jossWHERE last_name REGEXP'[gim]e'
6、[ ] 查询含有’a-h’中的字母加上’e’的字符串lavalava
SELECT*
FROM customers
WHERE last_name REGEXP'[a-h]e'
>配置英文