regular expression question

From: Joel Rodrigues <borgempath(at)Phreaker(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: regular expression question
Date: 2003-06-04 18:40:18
Message-ID: FDED57B4-96BB-11D7-89E7-0005024EF27F@Phreaker.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2003-06-04 18:41:52 Re: Nulls get converted to 0 problem
Previous Message Jay O'Connor 2003-06-04 18:36:36 to copy a record