how to get all repeated group with regular expression

scsoce scsoce at gmail.com
Fri Nov 21 09:31:21 EST 2008


say, when I try to search and match every char  from variable length 
string, such as string '123456',  i tried re.findall( r'(\d)*, '12346' ) 
, but only get '6' and Python doc indeed say: "If a group is contained 
in a part of the pattern that matched multiple times, the last match is 
returned."
cause the regx engine cannot remember all the past history then ?  is it 
nature to all regx engine or only to Python ? 




More information about the Python-list mailing list