REGEXP_SUBSTR延伸SUBSTR函数的功能,让你搜索一个正则表达式模式字符串。
这也类似于REGEXP_INSTR,而是返回子字符串的位置,它返回的子字符串本身。
语法
Oracle数据库中的REGEXP_SUBSTR函数的语法是:
REGEXP_SUBSTR(source_char, pattern [, position [, occurrence [, match_parameter ]]])
参数
source_char
搜索字符串。可以是任意的数据类型char,VARCHAR2,nchar,CLOB,NCLOB类型
pattern
正则表达式
Value | Description |
^ | Matches the beginning of a string. If used with a match_parameter of ‘m’, it matches the start of a line anywhere within expression. |
$ | Matches the end of a string. If used with a match_parameter of ‘m’, it matches the end of a line anywhere within expres |