Regular expressions

From MyWiki
Jump to: navigation, search

http://www.tutorialspoint.com/mysql/mysql-introduction.htm
http://www.tutorialspoint.com/mysql/mysql-regexps.htm

Example

mysql> SELECT uid,whencreated,employeetype,mail,proxyaddresses FROM adfields WHERE employeeType='Student'
 AND proxyaddresses   NOT  LIKE '%alumni%' AND proxyaddresses NOT REGEXP 'smtp:[a-z]{2,3}[0-9]'  
 AND mail  NOT REGEXP  '^[a-z]{2,3}[0-9]' ORDER BY whencreated DESC    ;