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"

Tags: