Difference between revisions of "Regular expressions"

From MyWiki
Jump to: navigation, search
(Created page with "http://www.tutorialspoint.com/mysql/mysql-introduction.htm")
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
http://www.tutorialspoint.com/mysql/mysql-introduction.htm
+
http://www.tutorialspoint.com/mysql/mysql-introduction.htm<br>
 +
http://www.tutorialspoint.com/mysql/mysql-regexps.htm<br>
 +
 
 +
'''Example'''
 +
<source lang="sql">
 +
 
 +
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    ;
 +
 
 +
 
 +
</source>

Latest revision as of 12:33, 4 October 2014

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    ;