Wednesday, 14 August 2013

Extract numbers between (()) with pyhton

Extract numbers between (()) with pyhton

I am really new to python and searched for solution that fits my problem
and no luck.
I want to load a text file and read each line and extract numbers that are
between (()). they are in random places through out the text file as well
and the length of numbers vary as well. Also words sometimes appear in the
(()) which I want to ignore
EX: blah blah blah ((3242341251255)) blah blah blah blah blah blah blah
blah blah blah blah blah blah blahblah blah blah ((234324123)) blah blah
the output just needs to be text file with the numbers listed

No comments:

Post a Comment