Quantcast
Viewing all articles
Browse latest Browse all 10

Answer by exussum for Why doesn't a non-greedy quantifier sometimes work in Oracle regex?

Because you're selecting too much:

SELECT  regexp_substr('A=1,B=2,C=3,','.*?B=.*?,'  ) as A_and_B,  -- Now works as expected  regexp_substr('A=1,B=2,C=3,','B=.*?,'  ) as B_only    -- works just fineFROM dual

SQL Fiddle: http://www.sqlfiddle.com/#!4/d41d8/11450


Viewing all articles
Browse latest Browse all 10

Trending Articles



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