He was just being a simple tool. There was no intention of that working.

There is nothing built in to do anything like this.

You may be able to find a compare/merge command line tool that you can
cfexecute... else, in CF... basically what you would have to do is: 

1) Remove the parts that DO match since its all you can pinpoint initially 
By 'remove' I mean extract and replace with a marker and store the removed
text in an array so you can put it back where it goes later
2) Then what you have left is only the unmatched
words/letters/numbers/punctuation etc... wrap your spanned highlight code
around each of those words/numbers/etc... that are left
3) Then put the extracted parts back into their places

I can think of a number of weird scenarios to throw a wrench in the 'basic'
logic for something like this and foresee it getting rather involved. You'll
have to ask yourself if it is worth it or not.

..:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com

-----Original Message-----
From: Abigail Coker [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 28, 2008 8:34 AM
To: CF-Talk
Subject: Re: Comparing 2 different chunks of text

>// just use equality comparison
><cfif textChunk1 IS textChunk2>
>  The two chucks seem from the same stock.
><cfelse>
>  You're nuts.  Just kidding :)
></cfif>

But using equality will only tell you if they're equal or not e.g. the
compare function will only return a -1,0 or 1.

I was hoping that there is a function or a UDF out there that will compare
two different strings and highlights the different words or character in the
second string...

hope it makes sense... 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306142
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