title: Python match '.\' at start of string
body: <p>I need to identify where some powershell path strings cross over into Python.</p>
  
  <p>How do I detect if a path in Python starts with <code>.\</code>  ??</p>
  
  <p>Here's an example:</p>
  
  <pre><code>import re
  
  file_path = ".\reports\dsReports"
  
  if re.match(r'.\\', file_path):
      print "Pass"
  else:
      print "Fail"
  </code></pre>
  
  <p>This Fails, in the debugger it lists</p>
  
  <pre><code>  expression = .\\\\\\
     string = .\\reports\\\\dsReports
  </code></pre>
  
  <p>If I try using replace like so:</p>
  
  <pre><code>import re
  
  file_path = ".\reports\dsReports"
  testThis = file_path.replace(r'\', '&amp;jkl$ff88')
  
  if re.match(r'.&amp;jkl$ff88', file_path):
      print "Pass"
  else:
      print "Fail"
  </code></pre>
  
  <p>the <code>testThis</code> variable ends up like this:</p>
  
  <pre><code>testThis = '.\\reports&amp;jkl$ff88dsReports'
  </code></pre>
  
  <p>Quite agravating. </p>