正则表达式-mysql中使用

基础知识请看 https://blog.csdn.net/xushiyu1996818/article/details/81385184
常用正则表达式 请看 https://blog.csdn.net/xushiyu1996818/article/details/81385022

mysql 使用正则表达式使用REGEXP
具体语法为str REGEXP regstr
两个都为字符串,都是要加双引号或单引号
如 “1224” REGEXP “123+4”

mysql 中转义符需要两个反斜杠,因为正则表达式需要一个,mysql语法解释正则的那个也要一个。
如 “122+4” REGEXP “12+\\+4”

猜你喜欢

转载自blog.csdn.net/xushiyu1996818/article/details/81388377
今日推荐