U131: Invalid regular expression
SQLSTATE: 2201B (Class 22 — Data Exception: invalid_regular_expression)
Example Postgres Log Output:
ERROR: invalid regular expression: quantifier operand invalid STATEMENT: SELECT regexp_replace('test', '<(?i:test)', '');
The regular expression is not valid. This usually happens when you made a typo in the pattern, or if you've used a non-portable expression that doesn't work in Postgres' regexp parser.
PostgreSQL uses a variant of the POSIX regular expression engine, which is a superset of the POSIX ERE form. Note that in particular that this is slightly different than the widely used PCRE expression engine used in many server-side languages.
Fix the regular expression syntax.
Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →