Re: PostgreSQL and Regular Expressions
| From: | GB Clark II | Date: | Mon, 17 Dec 2001 20:24:31 +0000 |
| Subject: | Re: PostgreSQL and Regular Expressions | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-15070@lists.php.net to get a copy of this message | ||
On Monday 17 December 2001 09:12, Joe Koenig wrote:
> I've been digging through the postgres docs and haven't found a way to
> use reg ex's in a query. Is there a simple way? Something similar to
> MySQL's RLIKE? I'm trying to select all records that start with a number
> [0-9]. Thanks,
>
> Joe
Take a look at postgresql's LIKE...:)
http://www7.us.postgresql.org/users-lounge/docs/7.1/user/functions-matching.html#FUNCTIONS-LIKE
One advantage I've found for postgresql is that if you've got a standard SQL
book (I like the two books "The Practical SQL Handbook" and "Practical SQL"
by Bowman, et al), you can just about use them as is without having to resort
to hacking the SQL. It is very rare for me to even have to modify the SQL I
get out of these books.
GB
--
GB Clark II | Roaming FreeBSD Admin
gclarkii@VSServices.COM | General Geek
CTHULU for President - Why choose the lesser of two evils?