"ankit" wrote:

>I want to get the start and end of all the patterns mattched in regex.
> I know I can get it with start() and end() fn of matched objects. But
> re.search() return the match object of first matching regex in the
> string. I want all match objects in that string

    for m in re.finditer(pattern, string):
        print m.start(), m.end()

(or use the start offset to re.search)

</F> 



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to