regular expression match collection

P at draigBrady.com P at draigBrady.com
Fri Feb 4 09:34:14 EST 2005


ajikoe at gmail.com wrote:
> Hello,
> 
> For example I have a string : "Halo by by by"
> Then I want to take and know the possition of every "by"
> how can I do it in python?

[ match.start() for match in p.finditer("Helo by by by") ]

see:
http://mail.python.org/pipermail/python-list/2004-December/255013.html

-- 
Pádraig Brady - http://www.pixelbeat.org
--



More information about the Python-list mailing list