WEB开发网
开发学院数据库Oracle oracle 正则表达式 阅读

oracle 正则表达式

 2012-02-13 16:28:03 来源:WEB开发网   
核心提示: 1 hard 1 work Hard 1 Hard 1 HardsSQL> select * from reg where regexp_like(name,'[^H|hard]'); ID NAME-- 1 work hard 1 work Hard 1 HardsSQL> sele

   1 hard


   1 work Hard


   1 Hard


   1 Hards



SQL> select * from reg where regexp_like(name,'[^H|hard]');



   ID NAME


---------- --------------------


   1 work hard


   1 work Hard


   1 Hards



SQL> select * from reg where regexp_like(name,'[^hard]');



   ID NAME


---------- --------------------


   1 work hard


   1 work Hard


   1 Hard


   1 Hards



SQL> select * from reg where regexp_like(name,'[^Hard]');



   ID NAME


---------- --------------------


   1 work hard


   1 hard


   1 work Hard


   1 Hards



SQL> select * from reg where regexp_like(name,'w.[Hard]');



   ID NAME


---------- --------------------


   1 work hard


   1 work Hard



SQL> select * from reg where regexp_like(name,'w*[Hard]');



   ID NAME


---------- --------------------


   1 work hard


   1 hard


   1 work Hard


   1 Hard


   1 Hards



SQL> select * from reg where regexp_like(name,'work [Hard]');



   ID NAME


---------- --------------------


   1 work Hard



SQL> select * from reg where regexp_like(name,'work [^Hard]'); --^在[]中使用时表示不接受该字符集合



   ID NAME


---------- --------------------


   1 work hard

上一页  1 2 3 

Tags:oracle 正则 表达式

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接