Ok, this project keeps getting more and more complex. . .
I'm having trouble coming up with a way to do the following in javascript:
I have two lists of varchar strings, list A and list B. Each list is of variable, relatively unlimited length. The same for the strings contained in the lists, but the strings ARE limited to the characters allowed in URLs--they are not huge pages of multi-paragraph text or anything like that.
I want to compare every string in list A to every string in list B.
My comparison, if I were to write in in SQL, would be like the following when looking for a "match."
((string1 LIKE '%string2%') OR (string2 LIKE '%string1%'))
As soon as I have a "match" I can stop checking--one match is enough because a match is BAD. No matches is good. (ooh! that hurts my grammar bone!)
I'd really like to do this in Javascript so that the UI is as streamlined as possible and I also think that my server side logic will be simplified by it. I suppose if I HAD to do it on the server side, I could pull it off using Ajax.
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment