Re: enforcing alphabetic/numeric content in "char" column

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rod Kreisler <rod(at)23net(dot)net>
Cc: Joel Rodrigues <borgempath(at)Phreaker(dot)net>, pgsql-novice(at)postgresql(dot)org
Subject: Re: enforcing alphabetic/numeric content in "char" column
Date: 2002-11-07 18:02:45
Message-ID: 23305.1036692165@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Rod Kreisler <rod(at)23net(dot)net> writes:
> Your regex should be '^[0-9]$' (the one you have will allow any string as
> long as there is a numeric character in it somewhere).

Almost: that only allows a single digit. Probably '^[0-9]+$' is the
correct regex.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Paesold 2002-11-07 18:15:40 Re: enforcing alphabetic/numeric content in "char" column
Previous Message Bruno Wolff III 2002-11-07 17:01:03 Re: enforcing alphabetic/numeric content in "char" column