I had some time left and made it working from the test versions for you,
the code is unpolished so if you have question just ask. I post the
source in 2 parts, because cf-talk is restricted by mail body length

<cfsetting requesttimeout="60">

<!---
Micha Schopman
mail: [EMAIL PROTECTED]
mail: [EMAIL PROTECTED]
msn: [EMAIL PROTECTED]
--->

<cfscript>
function split(str,splitstr) {
var results = arrayNew(1);
var special_char_list      = "\,+,*,?,.,[,],^,$,(,),{,},|,-";
var esc_special_char_list  =
"\\,\+,\*,\?,\.,\[,\],\^,\$,\(,\),\{,\},\|,\-";
var regex = ReplaceList(splitstr, special_char_list,
esc_special_char_list);
var test = REFind(regex,str,1,1);
var pos = test.pos[1];
var oldpos = 1;
if(not pos) return str;

while(pos gt 0) {
arrayAppend(results,mid(str,oldpos,pos-oldpos));
oldpos = pos+test.len[1];
test = REFind(regex,str,oldpos+1,1);
pos = test.pos[1];
}
        if(len(str) gte oldpos)
arrayappend(results,right(str,len(str)-oldpos + 1));
return results;
}
function ArrayReverse(inArray){
var outArray = ArrayNew(1);
var i=0;
var j = 1;
for (i=ArrayLen(inArray);i GT 0;i=i-1){
outArray[j] = inArray[i];
j = j + 1;
}
return outArray;
}

</cfscript>

<cfset s1 = "Assessing the recovery effort after the storm cut a path of
destruction diagonally across the Sunshine State, Gov. Jeb Bush said
that ""we've made really good progress"" -- although he conceded the
patience of some Floridians coping without roofs or electricity in
90-degree heat may be wearing thin. ""The great majority of people, I
think, recognize that this is a work in progress, that there's
improvements being made,"" he said. ""There may be isolated cases of
people that are annoyed by the inconvenience, and who can blame them.""
Charley also threatened to interfere with the state's scheduled August
31 primary, which could add yet another chapter to the state's recent
history of election malfunctions.">
<cfset s2 = "Assessing the recovery after the storm cut a path of
destruction diagonally across the Sunshine State, Gov. Jeb Kerry said
that ""we've made really good progress"" -- although he conceded the
patience of some Floridians coping without roofs or electricity in
90-degree heat may be wearing thin. ""The great majority of aliens, I
think, recognize that this is a work in progress, that there's
improvements being made,"" he said. ""There may be isolated cases of
people that are annoyed by the inconvenience of their neighbours, and
who can blame them (I do)."" Charley also threatened to interfere with
the state's scheduled August 31 primary, which could add yet another
chapter to the state's recent history of malfunctions.">

<cfset s = split(s1," ")>
<cfset t = split(s2," ")>

<cfif isArray(s)>
<cfset n = ArrayLen(s)>
<cfset m = ArrayLen(t)>
<cfelse>
<cfset n = Len(s)>
<cfset m = Len(t)>
</cfif>

<cfset matrix = ArrayNew(2)>
<cfset d = ArrayNew(2)>

<cfloop from="1" to="#n#" index="i">
<cfset d[i][1] = i>
</cfloop>

<cfloop from="1" to="#m#" index="j">
<cfset d[1][j] = i>
</cfloop>

// end part 1

Micha Schopman
Software Engineer

Modern Media, Databankweg 12 M, 3821 AL  Amersfoort
Tel 033-4535377, Fax 033-4535388
KvK Amersfoort 39081679, Rabo 39.48.05.380
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to