0
之間獲得字符串需要REGEXP_SUBSTR爲一個字符串和一個管REGEXP_SUBSTR爲字符串值和管
實施例結果1之間1
'blah,blah...|text=1234|nmbnxcm'
查找字符串值:
1234
實施例2
'test,test...|text=4321|testing'
結果2
4321
之間獲得字符串需要REGEXP_SUBSTR爲一個字符串和一個管REGEXP_SUBSTR爲字符串值和管
實施例結果1之間1
'blah,blah...|text=1234|nmbnxcm'
查找字符串值:
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。
我敢肯定,你會得到你想要的[這裏](https://stackoverflow.com/questions/7758859/how-to-extract-group-from-regular-expression-in-oracle)。 – jeff6times7