mysql (手机号,邮箱)匹配正则

  • 2020 年 3 月 18 日
  • 筆記

1.匹配手机号(查询记录中是否包含手机号)

select content from chat_record where content REGEXP "[1][35678][0-9]{9}"

2.匹配电子邮箱(查询记录中是否包含电子邮箱)

select content from chat_record where content REGEXP "@[a-z]+.com"