title: python regex simple help - dealing with parentheses
body: <p>I have bunch of data in this form</p>
  
  <p>xxx(xx.xx) - number of digits are not fixed. like</p>
  
  <pre><code>312(21.1)   378(25.5)   374(25.3)   157(10.6)   260(17.6)   1481(100)
  125(28.1)   91(20.4)    94(21.1)    52(11.7)    83(18.7)    445(100)
  50(28.4)    44(25)  29(16.5)    12(6.8) 41(23.3)    176(100)
  </code></pre>
  
  <p>note that they are all unicode strings. lets say the number left to parentheses are A, and the number in the parentheses is B. so A(B).</p>
  
  <p>what I want to do is create a function that returns list [A,B]. </p>
  
  <p>I know they can be done with RegExs, but I'm not really good at them. Anyway I did some search and followed tutorials, so I came up with :</p>
  
  <pre><code>re.search('\(.*?\)',s) # for B
  re.search('.?\(',s) # for A
  </code></pre>
  
  <p>Problem is, they return parentheses with the numbers. like</p>
  
  <pre><code>&gt;&gt;s
  u'312(21.1)'
  &gt;&gt;m=re.search('\(.*?\)',s)
  &gt;&gt;m.group()
  (21.1)
  </code></pre>
  
  <p>any help would be appreciated...</p>