Using .* can be a little dangerous, as the asterisk on its own tries to match as much text as possible. Try using .*? which will match as little text as possible (the other behaviour is called greedy). You could also just use a character set, for example, using
Code:
<hr>\n<A name=\d{1,3}></a>[0-9 ]+<br>
(Notice the space in the set) should work.
A note on your understanding of ".*": The dot matches any character (except for the newline, which requires a flag), and the asterisk extends matching of the previous expression by matching
0 or more of the previous expression. If you use the plus sign as quantifier, you'll match
1 or more of the previous expression, and the question mark matches
0 or 1 of the previous expression (except when used after another quantifier like above).
Edit: I guess a still safer way to write the expression would be
Code:
<hr>\s+<A name=\d{1,3}></a>[0-9 ]+<br>
(Notice the \s+ after the <hr>) since that will match differently encoded line breaks, while your expression only matches linebreaks encoded only by a newline. Might be academical, though