You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add three new regexp functions: regexp_matches, regexp_split_to_array,
and regexp_split_to_table. These functions provide access to the
capture groups resulting from a POSIX regular expression match,
and provide the ability to split a string on a POSIX regular
expression, respectively. Patch from Jeremy Drake; code review by
Neil Conway, additional comments and suggestions from Tom and
Peter E.
This patch bumps the catversion, adds some regression tests,
and updates the docs.
@@ -2883,9 +2918,6 @@ cast(-44 as bit(12)) <lineannotation>111111010100</lineannotation>
2883
2918
<indexterm>
2884
2919
<primary>substring</primary>
2885
2920
</indexterm>
2886
-
<indexterm>
2887
-
<primary>regexp_replace</primary>
2888
-
</indexterm>
2889
2921
2890
2922
<synopsis>
2891
2923
<replaceable>string</replaceable> SIMILAR TO <replaceable>pattern</replaceable> <optional>ESCAPE <replaceable>escape-character</replaceable></optional>
@@ -3004,6 +3036,21 @@ substring('foobar' from '#"o_b#"%' for '#') <lineannotation>NULL</lineannotat
3004
3036
<primary>regular expression</primary>
3005
3037
<seealso>pattern matching</seealso>
3006
3038
</indexterm>
3039
+
<indexterm>
3040
+
<primary>substring</primary>
3041
+
</indexterm>
3042
+
<indexterm>
3043
+
<primary>regexp_replace</primary>
3044
+
</indexterm>
3045
+
<indexterm>
3046
+
<primary>regexp_matches</primary>
3047
+
</indexterm>
3048
+
<indexterm>
3049
+
<primary>regexp_split_to_table</primary>
3050
+
</indexterm>
3051
+
<indexterm>
3052
+
<primary>regexp_split_to_array</primary>
3053
+
</indexterm>
3007
3054
3008
3055
<para>
3009
3056
<xref linkend="functions-posix-table"> lists the available
@@ -3134,7 +3181,10 @@ substring('foobar' from 'o(.)b') <lineannotation>o</lineannotation>
3134
3181
string containing zero or more single-letter flags that change the
3135
3182
function's behavior. Flag <literal>i</> specifies case-insensitive
3136
3183
matching, while flag <literal>g</> specifies replacement of each matching
3137
-
substring rather than only the first one.
3184
+
substring rather than only the first one. Other supported flags are
3185
+
<literal>m</>, <literal>n</>, <literal>p</>, <literal>w</> and
3186
+
<literal>x</>, whose meanings correspond to those shown in
0 commit comments