Peter Hoffmann
About
Archive
Talks
RSS Feed
Share
Peter Hoffmann
Follow
Director Data Engineering at
Blue Yonder
. Python Developer, Conference Speaker, Mountaineer
October 30, 2008
Python Regex Use - How to Get Positions of Matches
stackoverflow
python
This my Answer to the stackoverflow question:
Python Regex Use - How to Get Positions of Matches
:
import re p = re.compile("[a-z]") for m in p.finditer('a1b2c3d4'): print m.start(), m.group()