[Phpwm] mysql search / replace

Phil Beynon phil at infolinkelectronics.co.uk
Mon Oct 8 12:00:46 BST 2007


> Phil Beynon wrote:
> > Using;
> >
> > UPDATE tablename SET fieldname = REPLACE(fieldname, 'existing
> > text','replacement text')
> >
> > is there a way of setting a single char wildcard in 'existing text'?
>
>
> Does MySQL support regular expressions? (Presumably yes...)
>
>
> - --
> David Goodwin

Must admit I hadn't tried to use a REGEX specifically in there.

The problem I was getting was a field had got three spaces in it which were
causing something to pad across from where it should have been, this had
happened in a few places - but I couldnt make it match and replace multiple
spaces which seemed odd.

Phil
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.488 / Virus Database: 269.14.4/1056 - Release Date: 07/10/2007
18:12


More information about the Phpwm mailing list