title: Regex for Azure blob containers
body: <p>Trying to create a regex to use in the following code to ensure my input conforms to Azure blob container rules, but needing a regex means I have 2 problems.</p>
  
  <p>Rules: </p>
  
  <ul>
  <li>Letters and numbers and hyphens only </li>
  <li>No spaces </li>
  <li>Must start with a letter or number</li>
  </ul>
  
  <p>Not worried about lower case as I am going to .ToLower() it after this.</p>
  
  <p>Tried this but it keeps $ and ^ so I must be doing something wrong?</p>
  
  <pre><code>Regex rgx = new Regex(@"^[a-zA-Z][a-zA-Z0-9]*$");
  </code></pre>