title: How to match slashes globally in regex except if it is at the start of the string
body: <p>Hello stackoverflowers,</p>
  <p>i couldn't figure the solution out by myself and couldn't find a related answer so i seek your help :)</p>
  <p>I'm working in a VB.Net 4.x environment where i usualy have to join windows styled paths from various sources that are very unreliable in its format (leading slashes, ending slashes, sometimes double slashes inside) hence i can't use <code>Path.Join</code></p>
  <p>My next best guess is to regex replace any double occurance of a backward slash with a single one:
  <code>\\+</code></p>
  <p>which is too naive, as it also converts a server adress which starts with a leading double backslash.</p>
  <p>pseudocode</p>
  <pre><code>&quot;\\server123\\a\\b\\\c\\&quot;.replace(/\\+/g, &quot;\&quot;) -&gt; &quot;\server123\a\b\c&quot;
  </code></pre>
  <p>thats a problem. i want to exclude any leading backslashes from matching. So i though i negative lookahead it:</p>
  <p>regex</p>
  <pre><code>(?!^\\+)\\+
  </code></pre>
  <p>which would work in my example. But it does not what i want it to do. It matches the second backslash slash and replaces it.</p>
  <p>What is wrong with my second regex? how do i negative lookahead something at the start.</p>
  <p>Thanks for any explanation and solution</p>