正则表达式

来源:互联网 发布:淘宝御泥坊面膜 编辑:程序博客网 时间:2024/05/17 04:27
+ 匹配一次及以上* 匹配0次及以上SQL> select * from a1;NAME----------abcabcdefabccccSQL> select * from a1 where name like '%abc%';NAME----------abcabcdefabccccSQL> select * from a1 where regexp_like(name,'abc');NAME----------abcabcdefabccccSQL>  select * from a1 where regexp_like(name,'^abc$');NAME----------abc'abc' 等价于 like '%abc%'SQL> select * from a1;NAME----------abcabcdefabccccabSQL> select * from a1 where regexp_like(name,'abc+');NAME----------abcabcdefabccccSQL>  select * from a1 where regexp_like(name,'z*');NAME----------abcabcdefabccccabSQL> select * from a1 where regexp_like(name,'1*');NAME----------abcabcdefabccccab匹配0个或者多个1select * from a1 where regexp_like(name,'16*');相当于select * from a1 where name like '%1%'

0 0