Q:

How can I add a \n after every 3rd match in regex?

I have an HTML file in sublime text and I am trying to add a newline character after every 3rd </tr> tag  to group them into sets of 3
(this only needs to be pleasing to my eyeballs and will not be displayed anywhere in any web page
how can I do this with regex?
I can get all the tags easy enough with (</tr>) but I want every 3rd one only to replace with $1\n
some example data
   <tr data-id="17622538">
        <th title="10/14/2016, 7:37:13 AM" data-ago-date-timer="28807">1d</th>
        <td>Order 4990792 for symbol NASDAQ:OCUL has been executed at price 7.08 for 2000 shares</td>
    </tr>
    <tr data-id="17622537">
        <th title="10/14/2016, 7:37:13 AM" data-ago-date-timer="28808">1d</th>
        <td>Order 4990792 successfully placed</td>
    </tr>
    <tr data-id="17622536">
        <th title="10/14/2016, 7:37:13 AM" data-ago-date-timer="28809">1d</th>
        <td>Call to place market order to buy 2000 shares of symbol NASDAQ:OCUL </td>
    </tr>
    <tr data-id="17622538">
        <th title="10/14/2016, 7:37:13 AM" data-ago-date-timer="28807">1d</th>
        <td>Order 4990792 for symbol NASDAQ:OCUL has been executed at price 7.08 for 2000 shares</td>
    </tr>
    <tr data-id="17622537">
        <th title="10/14/2016, 7:37:13 AM" data-ago-date-timer="28808">1d</th>
        <td>Order 4990792 successfully placed</td>
    </tr>
    <tr data-id="17622536">
        <th title="10/14/2016, 7:37:13 AM" data-ago-date-timer="28809">1d</th>
        <td>Call to place market order to buy 2000 shares of symbol NASDAQ:OCUL </td>
    </tr>
    <tr data-id="17622538">
        <th title="10/14/2016, 7:37:13 AM" data-ago-date-timer="28807">1d</th>
        <td>Order 4990792 for symbol NASDAQ:OCUL has been executed at price 7.08 for 2000 shares</td>
    </tr>
    <tr data-id="17622537">
        <th title="10/14/2016, 7:37:13 AM" data-ago-date-timer="28808">1d</th>
        <td>Order 4990792 successfully placed</td>
    </tr>
    <tr data-id="17622536">
        <th title="10/14/2016, 7:37:13 AM" data-ago-date-timer="28809">1d</th>
        <td>Call to place market order to buy 2000 shares of symbol NASDAQ:OCUL </td>
    </tr>

the desired output would look like 
    <tr data-id="17622538">
    <th title="10/14/2016, 7:37:13 AM" data-ago-date-timer="28807">1d</th>
    <td>Order 4990792 for symbol NASDAQ:OCUL has been executed at price 7.08 for 2000 shares</td>
</tr>
<tr data-id="17622537">
    <th title="10/14/2016, 7:37:13 AM" data-ago-date-timer="28808">1d</th>
    <td>Order 4990792 successfully placed</td>
</tr>
<tr data-id="17622536">
    <th title="10/14/2016, 7:37:13 AM" data-ago-date-timer="28809">1d</th>
    <td>Call to place market order to buy 2000 shares of symbol NASDAQ:OCUL </td>
</tr>

<tr data-id="17622538">
    <th title="10/14/2016, 7:37:13 AM" data-ago-date-timer="28807">1d</th>
    <td>Order 4990792 for symbol NASDAQ:OCUL has been executed at price 7.08 for 2000 shares</td>
</tr>
<tr data-id="17622537">
    <th title="10/14/2016, 7:37:13 AM" data-ago-date-timer="28808">1d</th>
    <td>Order 4990792 successfully placed</td>
</tr>
<tr data-id="17622536">
    <th title="10/14/2016, 7:37:13 AM" data-ago-date-timer="28809">1d</th>
    <td>Call to place market order to buy 2000 shares of symbol NASDAQ:OCUL </td>
</tr>

<tr data-id="17622538">
    <th title="10/14/2016, 7:37:13 AM" data-ago-date-timer="28807">1d</th>
    <td>Order 4990792 for symbol NASDAQ:OCUL has been executed at price 7.08 for 2000 shares</td>
</tr>
<tr data-id="17622537">
    <th title="10/14/2016, 7:37:13 AM" data-ago-date-timer="28808">1d</th>
    <td>Order 4990792 successfully placed</td>
</tr>
<tr data-id="17622536">
    <th title="10/14/2016, 7:37:13 AM" data-ago-date-timer="28809">1d</th>
    <td>Call to place market order to buy 2000 shares of symbol NASDAQ:OCUL </td>
</tr>

A:

replace:    
((<tr[^<]+<th[^<]+<\/th>\s+<td[^<]+</td>\s+</tr>\s*){3})

with:       
\1\n

