What DLB so politely explained is that your expression is indeed greedy.
That means, the you have in there will match anything. That includes the pattern that comes after the , so in your case it will match all the way to the end of the string, including the end-of-table tag.
You should get a better result by making your * non-greedy by putting a ? after them.
Then they will match anything upto the pattern after them, so they will match anything except the end-of-table tag.