代码之家  ›  专栏  ›  技术社区  ›  dreambigcoder

regexp\u substr获取字符串值和管道之间的字符串

  •  0
  • dreambigcoder  · 技术社区  · 7 年前

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

    结果1:

    1234
    

    示例2

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

    4321
    
    1 回复  |  直到 7 年前
        1
  •  2
  •   Jeff Holt    7 年前

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

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