简体   繁体   中英

oracle REGEXP_SUBSTR

I've this string: GS24;;5289;TREG;248;LGS242604UG3AS7RWA;;[{"376108228000002801";;1}]

and I just want this number: LGS242604

What is the correct REGEXP_SUBSTR expression?

thx for helping!

This allows for NULL elements and strips the double-quotes:

SQL> Select
   replace(REGEXP_SUBSTR('"TS00;GS27;2;SXOR;"0000000001";"176108339523074094";8;8;[99];[(LAHE:227)"', '(.*?)(;|$)', 1, 6, NULL, 1), '"') AS field6
   FROM    dual;

FIELD6
------------------
176108339523074094

SQL>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM