# If you'd like to omit non-matching lines from the result; add ';d' to the end of the expression.
sed -E 's/(<td.*?>)([0-3]?[0-9])\\/([0-3]?[0-9])\\/((?:[0-9]{2})?[0-9]{2})(.*?<\\/td>)/$1$2.$3.$4$5/gm;t' <<< "<table>
<tr>
<td class=\"test\">9/2/2021 10:59:15 AM</td>
</tr>
<tr>
<td class=\"test\">12/15/2015 12:10:45 PM</td>
</tr>
<tr>
<td class=\"test\">10/10/2012 5:00:10 AM</td>
</tr>
</table>
"
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for SED, please visit: https://www.gnu.org/software/sed/manual/html_node/The-_0022s_0022-Command.html