title: Regular expression that accepts alphanumeric , non consecutive dash and non consecutive white space
body: <p>Can anyone help me create a regular expression that accepts alphanumeric (numbers and letters only) and dashes and white spaces.</p>
  
  <p>It shouldn't accept consecutive dashes and consecutive white spaces. or a dash followed by a white space and vice versa.
  It should always begin and end with alphanumeric characters as well.</p>
  
  <p>Thank you so much. Any help would be very much appreciated. (^-^)v</p>
  
  <pre><code>'Abcde' , '324 3a-32' : valid
  
  '-' , '324 3a - 32' , '-2323  d-', 'z- -a' : invalid
  </code></pre>
  
  <hr>
  
  <p>Thanks guys for all your help.  v(",)\</p>