title: Extract a file path or file name from a string in C#
body: <p>Take following string as an input:</p>
  
  <pre><code>var input = @"The file is: ""c:\sampleDirectory\sample subdirectory\sampleFileName.txt\"" which is a text file";
  </code></pre>
  
  <p>How can I extract only the file path from the above string.<br>
  Using Regex or a similar approach is preferred.</p>