【问题标题】:regexp_substr to get String between a string value and piperegexp_substr 获取字符串值和管道之间的字符串
【发布时间】:2017-07-18 23:04:02
【问题描述】:

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

示例 1

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

结果 1:

1234

示例 2

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

结果 2

4321

【问题讨论】:

  • 我很确定你会得到你想要的here

标签: sql regex oracle regexp-substr


【解决方案1】:

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

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

to_number 不是必需的,但它更有意为之。给定的 RE。

【讨论】:

    猜你喜欢
    • 2023-02-10
    • 1970-01-01
    • 2014-08-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-28
    相关资源
    最近更新 更多