REGEXP | regexp_replace in oracle
SyntaxDescriptionoftheillustrationregexp_replace.gifPurposeREGEXP_REPLACEextendsthefunctionalityoftheREPLACEfunctionbylettingyousearchastringforaregularexpressionpattern.Bydefault,thefunctionreturnssource_charwitheveryoccurrenceoftheregularexpressionpatternreplacedwithreplace_string.Thestringreturnedisinthesamecharactersetassource_char.ThefunctionreturnsVARCHAR2ifthefirstargumentisnotaLOBandreturnsCLOBifthefirstargumentisaLOB.ThisfunctioncomplieswiththePOSIXregularexpressionstandardandtheUni...
Syntax
Description of the illustration regexp_replace.gifPurpose
REGEXP_REPLACE extends the functionality of the REPLACE function by letting you search a string for a regular expression pattern. By default, the function returns source_char with every occurrence of the regular expression pattern replaced with replace_string. The string returned is in the same character set as source_char. The function returns VARCHAR2 if the first argument is not a LOB and returns CLOB if the first argument is a LOB.
This function complies with the POSIX regular expression standard and the Unicode Regular Expression Guidelines. For more information, please refer to Appendix C, "Oracle Regular Expression Support"[2].
source_char is a character expression that serves as the search value. It is commonly a character column and can be of any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB or NCLOB.
pattern is the regular exp...