Re: regular expression question - Mailing list pgsql-general

From wsheldah@lexmark.com
Subject Re: regular expression question
Date
Msg-id OF4CFFC0EE.F569601C-ON85256D3B.006D05F1@lexmark.com
Whole thread Raw
In response to regular expression question  (Joel Rodrigues <borgempath@Phreaker.net>)
List pgsql-general
Did you try the obvious:
'^[0-9|, -]{0,10}$'



Wes Sheldahl



Joel Rodrigues <borgempath@Phreaker.net>@postgresql.org on 06/04/2003
02:40:18 PM

Sent by:    pgsql-general-owner@postgresql.org


To:    pgsql-general@postgresql.org
cc:
Subject:    [GENERAL] regular expression question


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}$'


Hope you can help !

Cheers,
Joel





pgsql-general by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: regular expression question
Next
From: "scott.marlowe"
Date:
Subject: Re: Nulls get converted to 0 problem