((?!</tr>).)*
The repetition is applied to ((?!</tr>).)
and there is a single .
and a single lookahead. Therefore, this will check each and every .
(at each repetition) and make sure they are not followed by </tr>
.
((?!</tr>).*)
This is actually (?!</tr>).*
in disguise. There is a single lookahead and a single .*
. The lookahead will check only the first .
, but not the others, which is why everything will be matched, unless the immediate dots after the lookahead matches </tr>
.