Regex matching table rows in HTML [duplicate]

Use lazy matching in your regex: <tr.*?</tr>

But as others have mentioned, it’s more robust to use a proper parser if you can.

Leave a Comment