title: RegEx to extract Path and Filename from a Windows
body: <p>I have to write a RegEx to split a path and a filename from a full windows path, but I just dont get it...</p>
  
  <p>What I have right now is: </p>
  
  <pre><code>(?&lt;Path&gt;.*)(?:\\+)(?:[^\\]*)\\(?&lt;File&gt;.*)$
  </code></pre>
  
  <p>My test path is: C:\ProgramFiles\CONEXANT\DTSCONFIG\setup64.exe</p>
  
  <p>The Output looks like this</p>
  
  <pre><code>${Path} = C:\ProgramFiles\CONEXANT
  ${File} = setup64.exe
  </code></pre>
  
  <p>So for any reason the last directory of my path is not extracted.</p>
  
  <p>Can someone please help me out?</p>
  
  <p>Thanks.</p>