Thread: Re: problem with regexp (cant quote +)]

Re: problem with regexp (cant quote +)]

From
Tino Wildenhain
Date:
Hi Peter,

peter pilsl wrote:
>
> postgres 7.3.2:
>
> I wonder why the following expression fails. I came to this wondering why I
> could not search for + using the '~'-operator.
>
> select 'ok' where 'H+H'~'H\+H';
>

funny. but try

select 'ok' where 'H+H' ~ 'H[+]H';

Regards
Tino