I have a href as follow
<a id="EventId" href="/Test/TestDetail?TestDetailId=1">1 2021</a>
I have a requirement where I need to apply the text to be bold for the first delimitter till space. In this example the href should be
<a id="EventId" href="/Test/TestDetail?TestDetailId=1">**1** 2021</a>
I tried something like as follows but didn't worked
var txt = $('#EventId').text().split(' ');
$("#EventId").html(txt.replace(/(^w+)/, '<strong>$1</strong>'));
Can some one let me know what is the correct way to do this. The link should not be changed only the text should be appear in bold