I don’t know what I was thinking but that wont work either. Say you had
Bobby and Bobby Hartsfield

If you replaced Bobby Hartsfield with a link then Bobby... the code would
replace the Bobby within Bobby Hartsfield

You will need to order the names by length descending to make sure the
longer names are taken care of first but you will also need to use a regular
expression to replace the strings only if they are NOT within
<a.*?>(#artist#)</a> already


-----Original Message-----
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 27, 2007 3:15 PM
To: CF-Talk
Subject: RE: Regex help looking for a name in a string.

Yes, Do it in your query. Try this...

Select artist
>From tablename
Order by length(artist)


-----Original Message-----
From: Will Swain [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 27, 2007 10:24 AM
To: CF-Talk
Subject: RE: Regex help looking for a name in a string.

Hi Bobby,

Out of interest, how would I reorder by length? In the query? MySQL 4.1.7

Thanks

Will

-----Original Message-----
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] 
Sent: 27 April 2007 13:47
To: CF-Talk
Subject: RE: Regex help looking for a name in a string.

Reorder by length so the longer names come first. Also, I think you only
need replace(works_string, artist, "<a href='profiles.cfm?e=#profileID#'
target='artistWin'>#artist#</a>", "all")







~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276431
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to