Re: regular expression question

From: Joel Rodrigues <borgempath(at)Phreaker(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: regular expression question
Date: 2003-06-05 13:52:00
Message-ID: E13675F2-975C-11D7-BEC5-0005024EF27F@Phreaker.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday, June 5, 2003, at 01:14 , Jeff Eckermann wrote:

> '^[0-9, -]*$'

Thanks Jeff, Wes, Jim, Bruno ! And no, simply putting a space
wasn't really obvious to me :-)

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

Scott, thanks, that's more like what I had in mind, seems more
robust (idiot-proof).

> I don't think you can do what you want with a single regular
> expression.

Alvaro, you're right in that if I want to be exacting, rather
than simply keeping obviously undesirable data out, then I would
have to be more specific & elaborate.

Cheers & thank you ,
Joel

In response to

Browse pgsql-general by date

  From Date Subject
Next Message javier garcia - CEBAS 2003-06-05 14:56:54 EXTERN JOIN with WHEN query
Previous Message Jon Earle 2003-06-05 13:39:04 Re: Nulls get converted to 0 problem