johnny wrote:
> I need to get the content inside the bracket.
>
> eg. some characters before bracket (3.12345).
>
> I need to get whatever inside the (), in this case 3.12345.
>
> How do you do this with python regular expression?
>   

>>> import re
>>> x = re.search("[0-9.]+", "(3.12345)")
>>> print x.group(0)
3.12345

There's a lot more to the re module, of course.  I'd suggest reading the
manual, but this should get you started.


Gary Herron

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to