0

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!

TobiasWeinzierl
  • 109
  • 1
  • 7

1 Answers1

0

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>
Gary_W
  • 9,933
  • 1
  • 22
  • 40