Skip site navigation (1) Skip section navigation (2)

Re: Method to detect certain characters in column?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ianmmeyer(at)mac(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Method to detect certain characters in column?
Date: 2008-06-23 23:18:05
Message-ID: 4568.1214263085@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-general
"Ian Meyer" <ianmmeyer(at)gmail(dot)com> writes:
> So I have a column that contains usernames that have characters such
> as (c)(R), for example: fuch(c)r.. is there any way to find names
> with non A-Za-z0-9?

Hmm, none of the responses so far look right to me.  How about

	WHERE NOT (col ~ '^[A-Za-z0-9]*$')

			regards, tom lane

In response to

pgsql-general by date

Next:From: Steve AtkinsDate: 2008-06-23 23:28:12
Subject: Re: Method to detect certain characters in column?
Previous:From: Alvaro HerreraDate: 2008-06-23 21:47:39
Subject: Re: Method to detect certain characters in column?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group