]> granicus.if.org Git - postgresql/commit
I made the patch that implements regexp_replace again.
authorBruce Momjian <bruce@momjian.us>
Sun, 10 Jul 2005 04:54:33 +0000 (04:54 +0000)
committerBruce Momjian <bruce@momjian.us>
Sun, 10 Jul 2005 04:54:33 +0000 (04:54 +0000)
commit75a64eeb4b9dc4ad790ddc87f1f8357c2049576a
tree1a59ab33e18a4f136942520a932e12979cfba11c
parent73e2431817fec3d251a517ac185d210fda0ffcd6
I made the patch that implements regexp_replace again.
The specification of this function is as follows.

regexp_replace(source text, pattern text, replacement text, [flags
text])
returns text

Replace string that matches to regular expression in source text to
replacement text.

 - pattern is regular expression pattern.
 - replacement is replace string that can use '\1'-'\9', and '\&'.
    '\1'-'\9': back reference to the n'th subexpression.
    '\&'     : entire matched string.
 - flags can use the following values:
    g: global (replace all)
    i: ignore case
    When the flags is not specified, case sensitive, replace the first
    instance only.

Atsushi Ogawa
doc/src/sgml/func.sgml
src/backend/regex/regexec.c
src/backend/utils/adt/regexp.c
src/backend/utils/adt/varlena.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h
src/include/regex/regex.h
src/include/utils/builtins.h
src/test/regress/expected/strings.out
src/test/regress/sql/strings.sql