title: How to retrieve the locale(country) code from URL?
body: <p>I have a URL, which is like <a href="http://example.com/UK/Deal.aspx?id=322" rel="nofollow">http://example.com/UK/Deal.aspx?id=322</a></p>
  
  <p>My target is to remove the locale(country) part, to make it like <a href="http://example.com/Deal.aspx?id=322" rel="nofollow">http://example.com/Deal.aspx?id=322</a></p>
  
  <p>Since the URL may have other similar formats like: <a href="https://ssl.example.com/JP/Deal.aspx?id=735" rel="nofollow">https://ssl.example.com/JP/Deal.aspx?id=735</a>, using <strong>"substring"</strong> function is not a good idea.</p>
  
  <p>What I can think about is to use the following method for separating them, and map them back later.</p>
  
  <pre><code>HttpContext.Current.Request.Url.Scheme
  HttpContext.Current.Request.Url.Host
  HttpContext.Current.Request.Url.AbsolutePath
  HttpContext.Current.Request.Url.Query
  </code></pre>
  
  <p>And, suppose  <strong>HttpContext.Current.Request.Url.AbsolutePath</strong> will be:</p>
  
  <pre><code>/UK/Deal.aspx?id=322  
  </code></pre>
  
  <p>I am not sure how to deal with this since my boss asked me not to use "regular expression"(he thinks it will impact performance...) </p>
  
  <p><strong>Except</strong> "<em>Regular Expression</em>", is there any other way to remove <strong>UK</strong> from it?</p>
  
  <p>p.s.: the <strong>UK</strong> part may be <strong>JP</strong>, <strong>DE</strong>, or other country code.</p>
  
  <p>By the way, for USA, there is no country code, and the url will be <a href="http://example.com/Deal.aspx?id=322" rel="nofollow">http://example.com/Deal.aspx?id=322</a></p>
  
  <p>Please also take this situation into consideration.
  Thank you.     </p>