On Sun, Jun 14, 2009 at 1:15 AM, Pavel Stehule<pavel(dot)stehule(at)gmail(dot)com> wrote:
> can somebody explain this behave?
>
> postgres=# select '10' ~ e'^\\d+$';
> ?column?
> ----------
> t
> (1 row)
> ok
>
> postgres=# select '10' ~ '[0..9]+$';
> ?column?
> ----------
> t
> (1 row)
> ok
>
> postgres=# select '10' ~ '^[0..9]+$';
> ?column?
> ----------
> f
> (1 row)
Try '^[0-9]+$'.