title: Python: splitting a complex string including parentheses and |
body: <p>In a test file, I have records in the form</p>
  
  <pre><code>DATA(VALUE1|VALUE2||VALUE4)
  </code></pre>
  
  <p>and so on. </p>
  
  <p>I'd like to split this string in two passes, the first yielding "DATA", and the second giving me what's inside the parentheses, split at the "|". The second part looks trivial, but so far my attempts at the first were ugly.</p>
  
  <p>I'm more inclined towards regex than parsing as lines are quite simple in the end.</p>