title: convert array of words (strings) to regex and use it to get matches on a string
body: <p>What is the most concise and efficient way to translate an array of strings in a regex and then use the regex multiple times on different strings to get the result matches and then iterate over them? Now I'm using the following:</p>
  
  <pre><code>var myArray = ['peaches', 'bananas', 'papaya', 'supercity'];
  var myString = 'I want some papaya and some peaches';
  
  var regexFromMyArray = new RegExp(myArray.toString().replace(/,/g, '|'), 'gi');
  
  var matches = myString.match(regexFromMyArray) || [];
  
  if (matches.length) {
    for (var i = 0, l = matches.length; i &lt; l; i++) {
      console.log('Found: ' + matches[i]);
    }
  }
  </code></pre>
  
  <p><strong>performance is important here, so plain javascript please.</strong></p>