Strange regex problem

Dagur Páll Ammendrup dagurp at
Sat Mar 1 23:11:45 CET 2003


I have this code:

     p = re.compile('<!--START:(\w*?)-->')
     m =
     while m:
         begin = m.end()
         match =
         n ='<!--END:%s-->' % match,file,begin)
         m =,begin)

It works and everything but when I run it I get a long list of

literal 45
literal 73
literal 66
literal 70
literal 95
literal 71

printed out. What causes this??


More information about the Python-list mailing list