title: What is the regex to match alphanumeric 6 character words, separated by space or comma
body: <p>I am newbie in RegEx and trying to design a RegEx which could match the String like below:</p>
  <p>pattern 1 separated by comma and a space: <code>KEPM39, JEMGH5, HEPM21</code> ... (repeat)</p>
  <p>pattern 2 separated only by a space: <code>KEPM39 JEMGH5 HEPM21</code> ... (repeat)</p>
  <p>pattern 3 separated only by a comma: <code>KEPM39,JEMGH5,HEPM21</code> ... (repeat)</p>
  <p>this is my concept: <code>&quot;^[a-zA-Z0-9]{6,}[,\s]+$&quot;</code> but it seems wrong.</p>
  <p>#I want to validate the whole string, and I use javascript &amp; html to validate user input. (textarea)</p>
  <p>#duplicate change to repeat to be more suitable.</p>
  <pre><code>function validate(){
      var term = &quot;JEPM34, KEPM11 &quot;;
      var re = new RegExp(&quot;^[a-zA-Z0-9]{6,}[,\s]+$&quot;);
      if (re.test(term)) {
          return true
      } else {
          return false
      }
  }
  </code></pre>
  <p>thanks you in advance!</p>