pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Emi Lu <emilu@encs.concordia.ca>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Fernando Hevia <fhevia@ip-tel.com.ar>
Cc: pgsql-sql@postgresql.org
Subject: Re: trim(both) problem?
Date: Mon, 28 Apr 2008 09:19:03 -0400
Message-ID: <4815CEC7.4060405@encs.concordia.ca> (raw)
In-Reply-To: <751.1209158787@sss.pgh.pa.us>
References: <4812402D.7080404@encs.concordia.ca>
	<20080425134220.S8763@megazone.bigpanda.com>
	<031701c8a717$c7458e90$8f01010a@iptel.com.ar>
	<751.1209158787@sss.pgh.pa.us>

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!



view thread (7+ messages)

Message-ID: <4815CEC7.4060405@encs.concordia.ca>
Permalink:  ../4815CEC7.4060405@encs.concordia.ca/
Also on:    postgresql.org/message-id/4815CEC7.4060405@encs.concordia.ca

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: emilu@encs.concordia.ca, tgl@sss.pgh.pa.us, fhevia@ip-tel.com.ar
  Subject: Re: trim(both) problem?
  In-Reply-To: <4815CEC7.4060405@encs.concordia.ca>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox