title: Matching multiple regex patterns with the alternation operator?
body: <p>I ran into a small problem using Python Regex.</p>
  
  <p>Suppose this is the input:</p>
  
  <pre><code>(zyx)bc
  </code></pre>
  
  <p>What I'm trying to achieve is obtain whatever is between parentheses as a single match, and any char outside as an individual match. The desired result would be along the lines of:</p>
  
  <pre><code>['zyx','b','c']
  </code></pre>
  
  <p>The order of matches should be kept.</p>
  
  <p>I've tried obtaining this with Python 3.3, but can't seem to figure out the correct Regex. So far I have:</p>
  
  <pre><code>matches = findall(r'\((.*?)\)|\w', '(zyx)bc')
  </code></pre>
  
  <p><code>print(matches)</code> yields the following:</p>
  
  <pre><code>['zyx','','']
  </code></pre>
  
  <p>Any ideas what I'm doing wrong?</p>