Re: POSIX Regular Expression question

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Aldor <an(at)mediaroot(dot)de>, pgsql-sql(at)postgresql(dot)org
Subject: Re: POSIX Regular Expression question
Date: 2005-09-06 15:33:56
Message-ID: 20050906153356.GD30161@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Mon, Sep 05, 2005 at 16:19:28 +0200,
Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> Am Montag, 5. September 2005 15:57 schrieb Aldor:
> > I want to get out a string only with characters A-Za-z.
> > Any idea how to do this in Postgres with POSIX Regex?
>
> Presumably,
>
> colname ~ '^[A-Za-z]*$'
>
> If you want to be independent of locale issues, then you'd have to enumerate
> all the letters instead of using a range specification.

Or use:

colname ~ '^[[:alpha:]]*$'

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2005-09-06 15:38:57 Re: uuid type for postgres
Previous Message Bruno Wolff III 2005-09-06 15:03:40 Re: Help with UNION query