title: Javascript regex to match words separated by a spaced delimiter
body: <p>I would like to validate an input of words separated by some delimiter.
  The delimiter in this case is the "|" sign, separated by space before and after </p>
  
  <pre><code>Hello | There | Yes   -----&gt; Match
  Hello                 -----&gt; Match
  hello|There           -----&gt; No Match
  </code></pre>
  
  <p>So far I've gotten to only the first word with the following rejex: </p>
  
  <pre><code>^[a-zA-Z]+
  </code></pre>
  
  <p>how do I separate the words or numbers with a space and a delimiter? 
  PS Still working through the tutorials. Any help would be appreciated </p>
  
  <p>To Further clarify, i'm looking for regex for the above for a dojo dijit widget to validate the input properly. </p>
  
  <pre><code>    dojo.declare("some.class", dijit.form.ValidationTextBox, {
           regExp: ""
  
      });
  
     dojo.addOnLoad(function() {
  
       var formString = new some.class({
          }, "StringName");
     }
  
       &lt;form id="myForm" name="myForm"&gt;
          String: &lt;input id="StringName" name="name" type="text"&gt;
      &lt;/form&gt;
  </code></pre>