0

need regexp_substr for finding a string value between a string and a pipe

Example 1

'blah,blah...|text=1234|nmbnxcm'

Result 1:

1234

Example 2

'test,test...|text=4321|testing'

Result 2

4321
1
  • I'm pretty sure you'll get what you want here. Commented Jul 18, 2017 at 14:57

1 Answer 1

2

If this doesn't help, then please try this, assuming there is only one occurrence of what you want from the source string.

select to_number(regexp_substr('blah,blah...|text=1234|nmbnxcm', '|text=([0-9]+)|', 1, 1, null, 1))
from dual;

The to_number wouldn't be required but is a bit more intentional w.r.t. the given RE.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.