Re: Removing spaces - Mailing list pgsql-general

From Richard Huxton
Subject Re: Removing spaces
Date
Msg-id 200302201019.28765.dev@archonet.com
Whole thread Raw
In response to Re: Removing spaces  (Darren Ferguson <darren@thread.crystalballinc.com>)
List pgsql-general
On Wednesday 19 Feb 2003 9:25 pm, Darren Ferguson wrote:
> Don't know if this is what you are looking for but the following will
> remove them
>
> select translate('hello   \nworld   \n',' ','');

But surely this will remove *all* spaces, wheras Dave seemed to want only
spaces before newline characters.

> > > 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.

--
  Richard Huxton

pgsql-general by date:

Previous
From: "frank_lupo"
Date:
Subject: truncate problem
Next
From: Richard Huxton
Date:
Subject: Re: Restoring to a certain schema