Re: regular expression question - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: regular expression question
Date
Msg-id 20030604200031.GA16777@wolff.to
Whole thread Raw
In response to regular expression question  (Joel Rodrigues <borgempath@Phreaker.net>)
List pgsql-general
On Thu, Jun 05, 2003 at 00:10:18 +0530,
  Joel Rodrigues <borgempath@Phreaker.net> 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}$'

How about:
'^[-0-9, ]*$'

pgsql-general by date:

Previous
From: Joel Rodrigues
Date:
Subject: regular expression question
Next
From: Bruce Momjian
Date:
Subject: Re: libpgeasy.h and 7.3.2