正则表达式的使用:
1.以php结尾的数据
select * from user where username regexp ‘php$’;
2.以php结尾或以linux结尾的数据
select * from user where username regexp ‘php ′ o r u s e r n a m e r e g e x p ′ l i n u x ' or username regexp 'linux ′orusernameregexp′linux’;
3.查找包含php或linux或user的数据
select * from user where username regexp ‘php|linux|user’;