title: Is this a bug in powershell's TrimStart?
body: <p>Forgive me if I am wrong to be frustrated about this. But, this is why I hate trying to do anything remotely complex in a scripting language like PowerShell. It's a never ending battle with unpredictability.</p>
  
  <p>So, here it is:</p>
  
  <pre><code>PS C:\WINDOWS\system32&gt; $PSVersionTable.PSVersion
  
  Major  Minor  Build  Revision
  -----  -----  -----  --------
  5      1      15063  632 
  
  PS C:\WINDOWS\system32&gt; $testpath = "\\a-server-unc\home\auser\Outlook Data\archive1 - Copy.pst"
  
  PS C:\WINDOWS\system32&gt; $(Split-path -path $testpath -Parent)
  \\a-server-unc\home\auser\Outlook Data #Ok - Looks good
  
  PS C:\WINDOWS\system32&gt; $(Split-path -path $testpath -Parent).TrimStart("\\a-server-unc")
  home\auser\Outlook Data   # Where did my slash go?
  
  PS C:\WINDOWS\system32&gt; $(Split-path -path $testpath -parent).TrimStart("\\a-server-unc\home")
  Outlook Data  # Wait - What the...
  
  PS C:\WINDOWS\system32&gt; $testpath
  \\a-server-unc\home\auser\Outlook Data\archive1 - Copy.pst # Yep - I'm not insane. Powershell is eating my characters.
  
  PS C:\WINDOWS\system32&gt; $testpath = "\\a-server-unc\home\aloser\Outlook Data\archive1 - Copy.pst"  #Let's try changing the string a little
  
  PS C:\WINDOWS\system32&gt; $(Split-path -path $testpath -Parent).TrimStart("\\a-server-unc\home")
  loser\Outlook Data   # I must be insane
  
  PS C:\WINDOWS\system32&gt; $(Split-path -path $testpath -Parent).TrimStart("`\`\a-server-unc`\home") #Certainly escaping the slashes will fix this?
  loser\Outlook Data   # Nope, more hours wasted on unpredictable behavior
  </code></pre>
  
  <p>Now clearly there is some strange, "perfectly normal" behavior here, but I'm getting a little tired of Powershell eating my strings.</p>
  
  <p>What's the magic potion here?</p>