I want to extract integers from a string in which integers are separated by blank spaces i.e \' \'. How could I do that ??
Input
I=\'1 15 163 132\' <
import re x="1 15 163 132" print re.findall(r"[+-]?\d+(?:\.\d+)?",x)
If you have only positive integers you can simply do
print re.findall(r"\d+",x) [1, 15, 163, 132]