title: Regular Expression to extract the file name from the executable files
body: <p>I'm trying to extract the file name only from a bunch of file path as following:</p>
  
  <pre><code>C:\Program Files\test\test.test.test.test.exe
  </code></pre>
  
  <p>In this case, the file name is needed only:</p>
  
  <pre><code>test.test.test.test
  </code></pre>
  
  <p>Also, since the file name will be used as variables later, a named capturing group is required. So far, I have tried the following code but it still includes the <strong>.exe</strong>:</p>
  
  <pre><code>(?&lt;process&gt;[\w-]+\.exe)
  </code></pre>
  
  <p>Is there any solution for this? Thanks in advance.</p>