On Wednesday February 19 2003 11:19, Dave Smith wrote:
> I have a field of type text that has a value like
>
> 'hello \nworld \n'
>
> I would like to remove the trailing blanks between the last
> character and the newline. I would like to use replace with a regx
> like /[ ]+\n/\n/ but it does not seem to work.
You might try combining UPDATE with some of the string functions;
trim() + '\n' comes to mind.
http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/functions-string.html
Ed