Regexp_Replace returns the source_string with every occurrence of the pattern_to_find replaced with the replace_string : REGEXP_REPLACE « Regular Expressions Functions « Oracle PL/SQL Tutorial






The simplest format for this function is:

REGEXP_REPLACE (source_string, pattern_to_find, pattern_to_replace_by)

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

REGEXP_REPLACE (source_string, pattern_to_find,[pattern_to_replace_by, position, occurrence,match_parameter])

SQL> SELECT REGEXP_REPLACE('Mississippi', 'si', 'SI', 1, 0, 'i')
  2  FROM dual;

REGEXP_REPL
-----------
MisSIsSIppi

SQL>








18.4.REGEXP_REPLACE
18.4.1.Regexp_Replace returns the source_string with every occurrence of the pattern_to_find replaced with the replace_string
18.4.2.Regext_Replace
18.4.3.The Backslash as an Escape Character
18.4.4.REGEXP_REPLACE(x, pattern [, replace_string [, start [, occurrence [, match_option]]]]) searches x for pattern and replace it with replace_string
18.4.5.Convert a name in the form 'first middle last' into the 'last, middle first' format