I have a jQuery with a regex that replaces the dates that have slashes with periods and removes the time stamp but keeps the date, but it is not reflecting on the web browser. How do I dynamically change the date and reflect the results on the browser? Any help is welcomed :)
$(document).ready(function ()
{
var oldText = $(this).text();
var newText = oldText.replace(new RegExp("<td.*?>([0-3]?[0-9])\/([0-3]?[0-9])\/((?:[0-9]{2})?[0-9]{2}).*?<\/td>","g"), "$1.$2.$3");
});
<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>