Quantcast
Channel: SCN: Message List - SAP SQL Anywhere
Viewing all articles
Browse latest Browse all 2182

Re: Problem with REGEXP_SUBSTR

$
0
0

In this statement

 

select REGEXP_SUBSTR(

'Token1 blah, blah, (Token1 blah Token2 ignoreThis blah) blah, blah Token2 captureThis blah blah',

'(?<=Token1\\s+((\\([^\\)]+\\))|(((?!Token2).)+))*\\s+Token2\\s+)\\S*',  1,1);

 

I want the regular expression to completely ignore everything inside the parentheses

"(Token1 blah Token2 ignoreThis blah)",

so it returns "captureThis" when I pass 1 as the third parameter (occurrence-number).


Viewing all articles
Browse latest Browse all 2182

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>