using regexp

s99999999s2003 at yahoo.com s99999999s2003 at yahoo.com
Tue Mar 20 01:33:13 EDT 2007


hi
how can i use regexp to group these digits into groups of 3?

eg
line 123456789123456789

i have :

pat = re.compile("line\s+(\d{3})" , re.M|re.DOTALL)

but this only gives the first 3. I also tried

"line\s+(\d{3})+"
but also not working.
I need output to be ['123' ,'456','789', '123','456','789', .....]
thanks.




More information about the Python-list mailing list