See Perl and PostgreSQL regex and particularly Re^2: Perl and PostgreSQL regex.
In reply to Re: postgres reg expression quoting by BrowserUk in thread postgres reg expression quoting by zdzieblo