On Monday 09 January 2006 16:06, Jan-Åke Larsson wrote: > Jan-Åke Larsson wrote: > > "\[([0-9]+) .*?depth=(-?[0-9]+) height=(-?[0-9]+)" > > Okay, I haven't been as diligent as I should. There may be a starting > paranthesis instead of a space after the page number. A working pattern > is > > metrics_re = re.compile(\ > "\[([0-9]+)[ \[\(<].*?depth=(-?[0-9]+) height=(-?[0-9]+)" \
Do you really mean "[ \[\(<].*?depth"? Translates as a single space, [, ( or < character followed by (zero or more "any characters") zero or one times followed by "depth". I don't think so... Angus