regexp_substr 获取介于字符串值和管道之间的字符串
regexp_substr to get String between a string value and pipe
需要 regexp_substr 来查找字符串和管道之间的字符串值
示例 1
'blah,blah...|text=1234|nmbnxcm'
结果 1:
1234
示例 2
'test,test...|text=4321|testing'
结果 2
4321
如果 this 没有帮助,请尝试此操作,假设源字符串中只出现一次您想要的内容。
select to_number(regexp_substr('blah,blah...|text=1234|nmbnxcm', '|text=([0-9]+)|', 1, 1, null, 1))
from dual;
to_number 不是必需的,但更有意 w.r.t。给定的 RE.
需要 regexp_substr 来查找字符串和管道之间的字符串值
示例 1
'blah,blah...|text=1234|nmbnxcm'
结果 1:
1234
示例 2
'test,test...|text=4321|testing'
结果 2
4321
如果 this 没有帮助,请尝试此操作,假设源字符串中只出现一次您想要的内容。
select to_number(regexp_substr('blah,blah...|text=1234|nmbnxcm', '|text=([0-9]+)|', 1, 1, null, 1))
from dual;
to_number 不是必需的,但更有意 w.r.t。给定的 RE.