Unnamed
public text v1 · immutableIn [1]: import re
In [2]: a=re.compile(r'^([0-9]+).*')
In [3]: matches=a.match('123123jkjkfdjsfkj324234234')
In [4]: matches.groups()
Out[4]: ('123123',)
In [1]: import re
In [2]: a=re.compile(r'^([0-9]+).*')
In [3]: matches=a.match('123123jkjkfdjsfkj324234234')
In [4]: matches.groups()
Out[4]: ('123123',)