diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index f30eaa3e4ba..081f04ce1a9 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -5329,7 +5329,7 @@ substring('foobar' similar '#"o_b#"%' escape '#') NULL - 'thomas' ~ '.*thom.*' + 'thomas' ~ 't.*ma' t @@ -5343,7 +5343,7 @@ substring('foobar' similar '#"o_b#"%' escape '#') NULL - 'thomas' ~* '.*Thom.*' + 'thomas' ~* 'T.*ma' t @@ -5357,8 +5357,8 @@ substring('foobar' similar '#"o_b#"%' escape '#') NULL - 'thomas' !~ '.*thomas.*' - f + 'thomas' !~ 't.*max' + t @@ -5371,8 +5371,8 @@ substring('foobar' similar '#"o_b#"%' escape '#') NULL - 'thomas' !~* '.*vadim.*' - t + 'thomas' !~* 'T.*ma' + f @@ -5406,10 +5406,12 @@ substring('foobar' similar '#"o_b#"%' escape '#') 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