regexp_matches ( string text, pattern text [, flags text ] ) → setof text[]Returns substrings within the first match of the POSIX regular expression
pattern to the string, or substrings within all such matches if the g flag is used; see Section 9.7.3.regexp_matches('foobarbequebaz', 'ba.', 'g') → {bar}
{baz}