diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 6f1133365b8..2f4a5904e10 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -5266,7 +5266,7 @@ substring('foobar' from '#"o_b#"%' for '#') NULL - 'thomas' ~ '.*thom.*' + 'thomas' ~ 't.*ma' t @@ -5280,7 +5280,7 @@ substring('foobar' from '#"o_b#"%' for '#') NULL - 'thomas' ~* '.*Thom.*' + 'thomas' ~* 'T.*ma' t @@ -5294,8 +5294,8 @@ substring('foobar' from '#"o_b#"%' for '#') NULL - 'thomas' !~ '.*thomas.*' - f + 'thomas' !~ 't.*max' + t @@ -5308,8 +5308,8 @@ substring('foobar' from '#"o_b#"%' for '#') NULL - 'thomas' !~* '.*vadim.*' - t + 'thomas' !~* 'T.*ma' + f @@ -5343,10 +5343,12 @@ substring('foobar' from '#"o_b#"%' for '#') NULL Some examples: -'abc' ~ 'abc' true -'abc' ~ '^a' true -'abc' ~ '(b|d)' true -'abc' ~ '^(b|c)' false +'abcd' ~ 'bc' true +'abcd' ~ 'a.c' true — dot matches any character +'abcd' ~ 'a.*d' true — * repeats the preceding pattern item +'abcd' ~ '(b|x)' true — | means OR, parentheses group +'abcd' ~ '^a' true — ^ anchors to start of string +'abcd' ~ '^(b|c)' false — would match except for anchoring