title: How to implement find and remove / replace using jquery
body: <p>I have three text fields say Field1,Field2,Field3 out of that what ever data present in first two text box will reflect on Field3 (using blur event in jquery) while reflecting if any words followed by space then it will replace by semicolon <a href="http://jsfiddle.net/pE5wS/12/" rel="nofollow">See this</a></p>
  
  <p>now, i don't want to display some words on Field 3 i want to filter it out.
  for that i thought to do like this but it's not working (i wanted to exclude some words in both the field and then reflect but i tried for one)</p>
  
  <pre><code>$('[id^="titleField"]').blur(function(){
  
          var result = '';
          var count = 0;
  
  var excludeData = [ "Action","is","this","was","why","when","not","a","an"];        
  
  
              $('[id^="titleField"]:eq(0)').each(function(){
  
                  var currentValue = $(this).val();
  
                  result = $(excludeData).find(currentValue).remove();
  
                  console.log(result);
  
              });
  
              $('#keyWordFilter').val(result);
  
      });
  </code></pre>
  
  <p>expected result: </p>
  
  <p>consider words to be exclude : 'for','of', 'a','an', 'it'.</p>
  
  <p>Field 1: ' Text Book of Medical Parapsychology '</p>
  
  <p>Field 2: ' Book for Medical science '</p>
  
  <p>Field 3: 'Text;Book;Medical; Parapsychology;Book;Medical;science' // you can see for, of excluded </p>
  
  <p>any help will be appreciated thanks. </p>