| From: | Richard Huxton <dev(at)archonet(dot)com> |
|---|---|
| To: | Darren Ferguson <darren(at)thread(dot)crystalballinc(dot)com> |
| Cc: | Dave Smith <dave(dot)smith(at)candata(dot)com>, "PostgreSQL-General-List (E-mail)" <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Removing spaces |
| Date: | 2003-02-20 10:19:28 |
| Message-ID: | 200302201019.28765.dev@archonet.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | frank_lupo | 2003-02-20 10:20:27 | truncate problem |
| Previous Message | Robustelli Monica | 2003-02-20 10:13:05 | Postgres Error |