0

需要 regexp_substr 来查找字符串和管道之间的字符串值

示例 1

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

结果1:

1234

示例 2

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

结果 2

4321
4

1 回答 1

2

如果没有帮助,那么请尝试一下,假设源字符串中只出现一次您想要的内容。

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

to_number 不是必需的,但对给定的 RE 更有意。

于 2017-07-18T15:04:02.153 回答