Re: [ILUG] wee coding challenge..

From: John P. Looney (jplooney-ilug at domain online.ie)
Date: Thu 04 May 2000 - 12:17:16 IST


On Thu, May 04, 2000 at 12:14:12PM +0100, Peter McEvoy mentioned:
> Not sure how much SQL MySQL supports but you could try:
>
> update mytable
> set fullname = replace(fullname, ':');
>
> (this will replace every ':' with nothing, with extended args to replace,
> you can replace : with somthing else. Note that translate function won't
> work this way)
>
> Then repeat for all dodgy characters (unfortunately, regexp support is not
> that great in SQL so you can't do
> replace(fullname, /[^A-Za-z0-9]*/)
>
> but for a quick fix, this might help..

 Alas, there are 70 odd chars that are allowed in email addresses, and 220
that aren't...

Kate

-- 
"The fool must be beaten with a stick, for an intelligent person 
the merest hint is sufficient"                -- Zen Master Greg


This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:06:01 GMT