Re: replace text function - Mailing list pgsql-general

From Mark Wilson
Subject Re: replace text function
Date
Msg-id 053901c28611$05ab3eb0$3301a8c0@merl
Whole thread Raw
In response to Re: i have got an error  ("scott.marlowe" <scott.marlowe@ihs.com>)
Responses Re: replace text function  (Lee Kindness <lkindness@csl.co.uk>)
List pgsql-general
Must be a slow posting day today :~)

Thanks everyone.  I'm running PostGreSQL 7.2.1 and have run in the replace
function that numerous people sent me.  It works exactly as I would expect
it to.

Cheers,
Mark

----- Original Message -----
From: "Joe Conway" <mail@joeconway.com>
To: "Mark Wilson" <mark@mediasculpt.com>
Cc: <pgsql-general@postgresql.org>
Sent: Thursday, November 07, 2002 11:51 AM
Subject: Re: [GENERAL] replace text function


> Mark Wilson wrote:
> > Hi all,
> >
> > I'm trying to find a function that will replace one word with another in
a
> > string.
> >
> > e.g. select <replace function>('bob was here, bobina wasnt', 'bob',
'mike');
> > will return "mike was here, mikeina wasnt"
> >
> > Is there such a function already written in PostGreSQL?
> >
>
> It is new in 7.3 (currently in beta). See the function called "replace"
at:
> http://developer.postgresql.org/docs/postgres/functions-string.html
>
> test=# select replace('bob was here, bobina wasnt', 'bob', 'mike');
>             replace
> ------------------------------
>   mike was here, mikeina wasnt
> (1 row)
>
>
> HTH,
>
> Joe
>
>
>


pgsql-general by date:

Previous
From: Mike Mascari
Date:
Subject: Re: replace text function
Next
From: Thomas Lockhart
Date:
Subject: Re: CURRENT_TIME