Re: opposite of chr(int) - Mailing list pgsql-novice

From Henry Drexler
Subject Re: opposite of chr(int)
Date
Msg-id CAAtgU9QWSjMQgcW0uajNBQAVAkM8pB=Gqt0JqekvywgPEuN2DQ@mail.gmail.com
Whole thread Raw
In response to opposite of chr(int)  (Henry Drexler <alonup8tb@gmail.com>)
List pgsql-novice


On Thu, Oct 6, 2011 at 3:57 PM, Richard Broersma <richard.broersma@gmail.com> wrote:
On Thu, Oct 6, 2011 at 12:42 PM, Henry Drexler <alonup8tb@gmail.com> wrote:

How about:  -- using 9.1

SELECT 'wallawa9kl' ~ '^.{7}\d';

or assuming that you always have 7 letters 1 digit followed by 2
letters having a fixed width of 10:

SELECT 'wallawa9kl' ~ '^[a-zA-Z]{7}\d[a-zA-Z]{2}$';

--
Regards,
Richard Broersma Jr.


I believe that would be a regular expression right?  I will look that up in the manual, thank you for the succinct answer.

pgsql-novice by date:

Previous
From: Gary Chambers
Date:
Subject: Re: opposite of chr(int)
Next
From: Henry Drexler
Date:
Subject: Re: opposite of chr(int)