Regexp for extracting data in parenthesis and commas

Posted by anders on Stack Overflow See other posts from Stack Overflow or by anders
Published on 2010-04-17T14:13:04Z Indexed on 2010/04/17 14:23 UTC
Read the original article Hit count: 179

Filed under:
|

So, i have this :

"( ABC,2004 )"

And I would need to extract ABC in a variable and 2004 in another. So what I have for now is this:

In: re.compile(r'([^)]*,').findall("( ABC,2004 )")

Out: ['( ABC,']

© Stack Overflow or respective owner

Related posts about python

Related posts about regex