Re: trim(both) problem?

From: Emi Lu <emilu(at)encs(dot)concordia(dot)ca>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Fernando Hevia <fhevia(at)ip-tel(dot)com(dot)ar>, pgsql-sql(at)postgresql(dot)org
Subject: Re: trim(both) problem?
Date: 2008-04-28 13:19:03
Message-ID: 4815CEC7.4060405@encs.concordia.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Thanks a lot for all help! I understand how trim work now.

>> You could probably use instead:
>> select replace('<BR/>ROI Engineering Inc.', '<BR/>', '')

> That would zap occurrences in the middle of the string, though.
> regexp_replace would be better since it'd allow anchoring the
> pattern, eg
>
> select regexp_replace('<BR/>ROI Engineering Inc.', '^<BR/>', '');
> select regexp_replace('ROI Engineering Inc.<BR/>', '<BR/>$', '');

This is exactly I am looking for, but my version
PostgreSQL 8.0.15 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.2

does not support this func, and have to think about the other way to
'trim' the ^<BR/> & <BR>$

Thank you again!

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message chester c young 2008-04-28 17:01:37 Re: psql: no schema info
Previous Message Richard Huxton 2008-04-28 07:30:09 Re: psql: no schema info