title: Convert URI to windows path format
body: <p>In Javascript I'm looking for a regex that will convert URI to Windows format, but I'm not too familiar with URI cases to form a regex.
  Basically...</p>
  
  <ul>
  <li><code>/c/myDocs/file.txt</code></li>
  <li><code>//myDocs/file.txt</code></li>
  </ul>
  
  <p>should be changed to</p>
  
  <pre><code>"C:\myDocs\file.txt"
  </code></pre>
  
  <p>There may be other cases that I'm unaware of. Hence needing some help. All I have so far is swapping the slashes over with a replace, but not the drive name with a regex.</p>
  
  <pre><code>function pathME(apath)
  {
      apath = apath.replace(/\//g, "\\")
      return apath;
  }
  </code></pre>
  
  <p>Regex wizards, start your engines please!</p>