Oracle SQL - REGEXP_SUBSTR function

Introduction

REGEXP_SUBSTR function returns a sub string.

REGEXP_SUBSTR uses regular expressions to specify the beginning and ending points of the returned string.

The simplest format for this function is:

REGEXP_SUBSTR(source_string,  pattern_to_find) 

The general format for the REGEXP_SUBSTR function with all the options is:

REGEXP_SUBSTR(source_string, pattern_to_find [, position, 
  occurrence, match_parameter]) 

Demo

SQL>
SQL>-- from  ww w.j  a  v a  2 s .  c om
SQL> SELECT REGEXP_SUBSTR('Mississippi', 'si', 1, 2, 'i') FROM dual ;

RE
--
si

SQL>