title: Regex Find and Replace File Path in File Javascript
body: <p>My apologies if this question has been asked and answered, but after exhaustive research I cannot find it.</p>
  
  <p>I have a fairly large text file in which are embedded file paths with file names along with text.</p>
  
  <p>The Problem:</p>
  
  <ol>
  <li>Some of these file paths are http and others are normative file
  paths.</li>
  <li>The normal file paths can end with any file and extension.</li>
  <li>The slash can be either / or \ in the file path.</li>
  </ol>
  
  <p>What needs to get done:
  I need to find the file paths and replace them without touching the name of the actual file itself or the extension.
  For instance:</p>
  
  <p><code>E:\sam\sam2\sam3\fafa.png needs to be replaced as foo\fafa.png or foo/fafa.png</code></p>
  
  <p>However, I cannot touch nor replace any http file names..these must be excluded from the find and replace.</p>
  
  <p>I have tried numerous possibilities in Regex (which I admit is a weakness in my coding skills), but nothing seems to work.</p>
  
  <p>Any and all help would be appreciated and if you have time an explantion of the expression. 
  Important note: Regex expression which works with Javascript/Node would be appreciated. </p>