-
-
+
+
- The regexp_replace function provides substitution of
- new text for substrings that match POSIX regular expression patterns.
- It has the syntax
- regexp_replace(source,
- pattern, replacement
- , flags ).
- The source string is returned unchanged if
- there is no match to the pattern. If there is a
- match, the source string is returned with the
- replacement string substituted for the matching
- substring. The replacement string can contain
- \n, where n is 1
- through 9, to indicate that the source substring matching the
- n'th parenthesized subexpression of the pattern should be
- inserted, and it can contain \& to indicate that the
- substring matching the entire pattern should be inserted. Write
- \\ if you need to put a literal backslash in the replacement
- text.
- The flags parameter is an optional text
- string containing zero or more single-letter flags that change the
- function's behavior. Flag i specifies case-insensitive
- matching, while flag g specifies replacement of each matching
- substring rather than only the first one. Supported flags (though
- not g) are
- described in .
-
-
- Some examples:
-regexp_replace('foobarbaz', 'b..', 'X')
- fooXbaz
-regexp_replace('foobarbaz', 'b..', 'X', 'g')
- fooXX
-regexp_replace('foobarbaz', 'b(..)', 'X\1Y', 'g')
- fooXarYXazY
-
-
-
The regexp_match function returns a text array of
captured substring(s) resulting from the first match of a POSIX
+ The regexp_replace function provides substitution of
+ new text for substrings that match POSIX regular expression patterns.
+ It has the syntax
+ regexp_replace(source,
+ pattern, replacement
+ , flags ).
+ The source string is returned unchanged if
+ there is no match to the pattern. If there is a
+ match, the source string is returned with the
+ replacement string substituted for the matching
+ substring. The replacement string can contain
+ \n, where n is 1
+ through 9, to indicate that the source substring matching the
+ n'th parenthesized subexpression of the pattern should be
+ inserted, and it can contain \& to indicate that the
+ substring matching the entire pattern should be inserted. Write
+ \\ if you need to put a literal backslash in the replacement
+ text.
+ The flags parameter is an optional text
+ string containing zero or more single-letter flags that change the
+ function's behavior. Flag i specifies case-insensitive
+ matching, while flag g specifies replacement of each matching
+ substring rather than only the first one. Supported flags (though
+ not g) are
+ described in .
+
+
+ Some examples:
+regexp_replace('foobarbaz', 'b..', 'X')
+ fooXbaz
+regexp_replace('foobarbaz', 'b..', 'X', 'g')
+ fooXX
+regexp_replace('foobarbaz', 'b(..)', 'X\1Y', 'g')
+ fooXarYXazY
+
+
+
The regexp_split_to_table function splits a string using a POSIX
regular expression pattern as a delimiter. It has the syntax