Wednesday, January 2nd, 2008
Postgres select replace with regular expression
Postgres seriously kicks ass, here's a quick way to do a substring based on a regular expression. A Co-worker wanted to get the first word out of a column that contained a sentence. If we were using something lame like oracle we'd have to do gymnastics to do that.
It's a one-liner in postgres.
SELECT substring('this is [...]






