I want to get values between = and ^ . My expression like;
select regexp_substr('NUMBER=2019-024^','\={1}([^^]+)',1, 1) from dual
I want only 2019-024 part. With these expression I got "=2019-024". How can I get 2019-024?
Thank you!
I might even suggest not using regex here and instead resort to the base string functions:
SELECT SUBSTR(col, INSTR(col, '=') + 1, INSTR(col, '^') - INSTR(col, '=') - 1)
FROM yourTable;
If you really want to use regex here, then use a capture group:
SELECT REGEXP_SUBSTR('NUMBER=2019-024^', '=(.*?)\^', 1, 1, NULL, 1) FROM dual;
=([^^]+)and take the group 1 value