Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. dragonkeeper

    comparing elements from diffrent arrays.

    tsuji I don't like the look of the regex using greedy match In the complete code the RegExp is non-greedy as it spans multiple lines. title=" language:(.|\s)*?<\/la Alerting the length or escaping the string is a good ideal. It didn't occur to me to do this as normally I would have used Perl...
  2. dragonkeeper

    comparing elements from diffrent arrays.

    Thanks to everyone for their help, I knew that it was something very simple as well as stupid on my part. Thanks for putting me in the right direction.
  3. dragonkeeper

    comparing elements from diffrent arrays.

    tsuji, After taking another look, i went with what you had suggested and took it a step further. I didn't write the code that is being parsed, I think a bunch of monkeys got loose in a computer lab and created the code many years ago. As usual instead of a re-write my manager wants to" fix...
  4. dragonkeeper

    comparing elements from diffrent arrays.

    tsuji The array is built using a regular Expression that is parsing a page of code. So each element of the array should be represented correctly. var titleLang = new Array; var language = new RegExp('title=" language:.*', "gi"); while ((getTitleLang = (language .exec(searchResults))) != null)...
  5. dragonkeeper

    comparing elements from diffrent arrays.

    Thanks i really appreciate the help; I added the following alert just before the if statement alert(this[i]+" "+ b[j]). Even when the values are identical the code steps over the if code block.
  6. dragonkeeper

    comparing elements from diffrent arrays.

    I've have previously tried using the not equal operator as opposed to is equal operator. This resulted in nothing being written to array b. That is what led me to using the continue statement to break the iteration upon finding a match. I don't understand why the code as originally written does...
  7. dragonkeeper

    comparing elements from diffrent arrays.

    Yes that is correct
  8. dragonkeeper

    comparing elements from diffrent arrays.

    Thanks for your input mmerlinn, here is bit more detail. My intention is to prototype a unique function for arrays that returns a new array without duplicate elements. I believe that a unique function was added to JavaScript 1.5, but I'm coding this for IE, hence I'm stuck using JavaScript...
  9. dragonkeeper

    comparing elements from diffrent arrays.

    the following code is not working. it appears the statement that evaluates array elements is not working as i intended. But if i hard code a value in place of one the elements the code works as intended.What am i missing? code is pasted below. Array.prototype.unique = function() { var i...

Part and Inventory Search

Back
Top