>>>>> "GW" == George Weaver <[email protected]> writes:
GW> SELECT REGEXP_REPLACE(LOWER('300 North 126th Street'),
GW> E'(\d)(st|nd|rd|th)', E'\1', 'g');
GW> regexp_replace
GW> ------------------------
GW> 300 north 126th street
GW> (1 row)
The E'' syntax eats your backslashes. For that version, try just:
SELECT REGEXP_REPLACE(LOWER('300 North 126th Street'),'(\d)(st|nd|rd|th)',
'\1', 'g');
-JimC
--
James Cloos <[email protected]> OpenPGP: 1024D/ED7DAEA6
--
Sent via pgsql-general mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general