title: Splitting line with escaped separators in Python
body: <p>TL; DR:</p>
  
  <pre><code>line = "one|two|three\|four\|five"
  fields = line.split(whatever)
  </code></pre>
  
  <p>for what value of <code>whatever</code> does:</p>
  
  <pre><code>fields == ['one', 'two', 'three\|four\|five']
  </code></pre>
  
  <p>I have a file delimited by pipe characters. Some of the fields in that file also include pipes, escaped by a leading backslash.</p>
  
  <p>For example, a single row of data in this file might have an array representation of <code>['one', 'two', 'three\|four\|five']</code>, and this will be represented in the file as <code>one|two|three\|four\|five</code></p>
  
  <p>I have no control over the file. I cannot preprocess the file. I <em>have</em> to do it in a single split.</p>
  
  <p>I ultimately need to split each row of this file into the separate fields, but that leading backslash is proving to be all sorts of trouble. I initially tried using a negative look-ahead, but there's some sort of arcana surrounding python strings and double-escaped characters which I don't understand, and this is stopping me from figuring it out.</p>
  
  <p>Explanation of the solution is appreciated but optional.</p>