当前位置: 代码迷 >> Oracle开发 >> oracle 用正则匹配where 每个独力条件
  详细解决方案

oracle 用正则匹配where 每个独力条件

热度:115   发布时间:2016-04-24 06:38:44.0
oracle 用正则匹配where 每个独立条件
[align=left]比如:where d.t1 btween 1 and 2 and a.txt=b.txt and (a.m=b.n and c.txt=d.txt ) and b.txt=d.txt   and d.t between  1 and 2
匹配出结果:
d.t1 btween 1 
 a.txt=b.txt  
(a.m=b.n and c.txt=d.txt ) 
b.txt=d.txt
d.t between  1 and c 

匹配出  where 后面 or 与 and 的条件,括号内作为一个整体[/align] 

分数不多,求大神帮忙 
------解决方案--------------------
我指的不是and /or ,而是分割规则。如果你按规则提前将用来分割的and/ or用特殊符号代替,那么连正则都可以不用,直接replace掉就好了
  相关解决方案