Hi Simone
I have also had issues when trying to search for data with [ or ] and found the following to work:
DECLARE
BEGIN
RETURN NOT match_regex($parameter0, '.*\x5b.*', NULL)
AND NOT match_regex($parameter0, '.*\x5d.*', NULL);
END
It works better if you search for the ASCII version of [ or ] in a regular expression.
\x5B LEFT (SQUARE) BRACKET
\x5D RIGHT (SQUARE) BRACKET
Regards
Danie