Andreas Kretschmer wrote on 28.10.2007 13:32:
But it seems my problem was actually caused by something else:

SELECT regexp_replace(myfield, '\s*', '', 'g')
FROM mytable;

you should escape the \, change to ...'\\s*'...
Ah! Didn't think this was necessary, as \t or \n did not need to be escaped.

But without anchors this replaces all whitespaces, also within the text
and not only at the beginning/end (^ and $)
Yes of course, this was only for testing ;)

Thanks for your help!

Thomas


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to