I'm failing to find the correct regex to solve this adaptation. From
<td> foo </td>
<td> bar </td>
|
<td> two foo </td>
<td> two bar </td>
|
I want to get to
<tr>
<td> foo </td>
<td> bar </td>
</tr></tr>
<td> two foo </td>
<td> two bar </td>
</tr>
By means of identifying N repetitions of the regex <td>(.*)</td>
.
Could I get some help?
Thanks!
#EDIT: I am generating the html code myself from a different format ( initial input was
| foo | bar | | twofoo | twobar |
and I'm generating it from such).
I am doing the conversion on JS, but for trying it out I'm using https://regex101.com/, if it is useful to know.