5、REGEXP_SUBSTR(x,pattern[,start[,occurrence[, match_option]]])用于在x中查找pattern并返回。可以参考字符串函数 SUBSTR(),参数同REGEXP_INSTR函数,参考第3
- DECLARE
- V_RESULT VARCHAR2(255);
- BEGIN
- --返回‘light’
- SELECT REGEXP_SUBSTR('But, soft! What light through yonder window breaks?','l[[:alpha:]]{4}') INTO V_RESULT
- FROM DUAL;
- DBMS_OUTPUT.PUT_LINE(V_RESULT);
- END;