ORACLE REGEXP oracle regexp_substr中正则表达式问题
oracle REGEXP_SUBSTR\u95ee\u9898\ --\u8981\u5339\u914d\u7684\u5b57\u7b26\u662f\u7279\u6b8a\u5b57\u7b26
. --\u5339\u914d\u9664\u4e86null\u4ee5\u5916\u4efb\u610f\u5355\u4e2a\u5b57\u7b26
* --\u5339\u914d\u524d\u9762\u7684\u5b57\u7b260\u6b21\u6216\u591a\u6b21
? --\u5339\u914d\u524d\u9762\u7684\u5b57\u7b260\u6b21\u62161\u6b21
\u6574\u4e2a\u6b63\u5219\u8868\u8fbe\u5f0f\u610f\u601d\u662f \u4ece{\u5f00\u59cb\uff0c\u5230}\u7ed3\u675f\uff0c\u4e2d\u95f4\u5b58\u5728\u4efb\u610f\u4e2a\u9664\u4e86null\u4ee5\u5916\u4efb\u610f\u5355\u4e2a\u5b57\u7b26\u3002
[[:alpha:]] \u4efb\u4f55\u5b57\u6bcd\u3002
[[:digit:]] \u4efb\u4f55\u6570\u5b57\u3002
[[:alnum:]] \u4efb\u4f55\u5b57\u6bcd\u548c\u6570\u5b57\u3002
[[:space:]] \u4efb\u4f55\u767d\u5b57\u7b26\u3002
[[:upper:]] \u4efb\u4f55\u5927\u5199\u5b57\u6bcd\u3002
[[:lower:]] \u4efb\u4f55\u5c0f\u5199\u5b57\u6bcd\u3002
[[:punct:]] \u4efb\u4f55\u6807\u70b9\u7b26\u53f7\u3002
举例:
sql:select regexp_substr('CYJ8-ABC','[0-9]+') from dual;
以上sql执行结果:8;
备注:
REGEXP_SUBSTR函数格式如下:
function REGEXP_SUBSTR(String, pattern, position, occurrence, modifier)
__srcstr :需要进行正则处理的字符串
__pattern :进行匹配的正则表达式
__position :起始位置,从第几个字符开始正则表达式匹配(默认为1)
__occurrence :标识第几个匹配组,默认为1
__modifier :模式('i'不区分大小写进行检索;'c'区分大小写进行检索。默认为'c'。)
貌似这个符合你的要求:
SELECT REGEXP_SUBSTR('<p>2342234<b>23</b>434</p>23<p>eee</p>','(<p>){1}(.*?)(</p>){1}',1) FROM DUAL
扩展阅读:substring ... concurrenthashmap ... oracle regexp like ... hive regexp ... gopro hero11 black ... regex java ... oracle regexp substr ... oracle regexp instr ... group by ...