>>>>> "GW" == George Weaver <gweaver(at)shaw(dot)ca> 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 <cloos(at)jhcloos(dot)com> OpenPGP: 1024D/ED7DAEA6