title: Regular expression for no white space at start or end, but allow white space in middle, empty and any 6-20 characters?
body: <p>I use <code>^$|^[^\s]+(\s+[^\s]+)*$</code> to achieve:</p>
  
  <ol>
  <li>no white space at start or end allow white </li>
  <li>space in middle</li>
  <li>empty string</li>
  </ol>
  
  <p>But how can I put the quantifiers to limit character count in between 6 - 20?</p>
  
  <p>The following should pass</p>
  
  <pre><code>""              &lt;-- (empty string)
  "中文"          &lt;-- ( any character)
  "A B"          &lt;-- (allow space in middle)
  "hi! Hello There"
  </code></pre>
  
  <p>The following should fail</p>
  
  <pre><code>"A"            &lt;-- (less than 2 number of characters)
  " AB"          &lt;-- (space at the start)
  "AB "          &lt;-- (space at the end)
  " AB "
  "test test test test test test"  &lt;--- (more than 20 characters included spaces)
  </code></pre>
  
  <p>Thanks!</p>