Mysql filters data based on regular expressions

Sample SQL, such as filtering data that conforms to the mail format according to the mail rules, please feel free to use other

select *  from tkp_emails where mailaddr not REGEXP '^[0-9a-z][a-z0-9\._-]{1,}@[a-z0-9-]{1,}[a-z0-9]\.[a-z\.]{1,}[a-z]$'

Guess you like

Origin blog.csdn.net/blackhost/article/details/85645458