Re: regular expression question - Mailing list pgsql-general

From scott.marlowe
Subject Re: regular expression question
Date
Msg-id Pine.LNX.4.33.0306041429010.16396-100000@css120.ihs.com
Whole thread Raw
In response to regular expression question  (Joel Rodrigues <borgempath@Phreaker.net>)
List pgsql-general
On Thu, 5 Jun 2003, Joel Rodrigues wrote:

> Hi,
> I'm trying to write a check on a column restricting the data to
> numerals from 0-9, commas,  dashes '-' and single spaces. To
> allow the entry of something like "134-140, 310-312".
>
> I seem to have got everything but the single spaces.
>
> '^[0-9|,-]{0,10}$'

Try this:

'^[[:digit:][:space:],-]{0,10}$'




pgsql-general by date:

Previous
From: "Vincent Hikida"
Date:
Subject: Re: Nulls get converted to 0 problem
Next
From: wsheldah@lexmark.com
Date:
Subject: Re: regular expression question