--- 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}$'
'^[0-9, -]*$'
The ordering inside the square brackets doesn't
matter, except that the "-" needs to be somewhere
where it cannot be mistaken for a range operator. The
conditions for that vary according to the
implementation, but I think the above should work with
PostgreSQL.
Change the "*" to "+" if you want to require something
to be entered.
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com