title: C# Regex that matches Excel file extensions
body: <p>I need a regex for my file upload to choose only Excel files I tried using this as my pattern(below)</p>
  <pre><code>Regex reg = new Regex(&quot;^.\.(xls|xlsx)&quot;);
  </code></pre>
  <p>Unfortunately I can't escape the &quot;\.&quot; part of the the pattern.</p>