title: Regex to match a custom ID format
body: <p>I need to check if a string has the following format:</p>
  
  <ul>
  <li>The length must be at least one</li>
  <li>The first character and last character must be alpha-numeric</li>
  <li>Any characters between the first and last character can be anything except white space.</li>
  </ul>
  
  <p>This is my current attempt:</p>
  
  <pre><code>/^([a-z0-9]+[\S]+)?[a-z0-9]+$/ig
  </code></pre>
  
  <p>I am new to regex. It seems to work, but does it fully satisfy the requirements above? Is there anything else I need to think about?</p>