I've html code with a comma between it. I need to remove this comma. I tried different ways but could not do it.
can anyone please help me to remove this comma.
below is the code:
<div class="crm-content">
<div class="location vcard"><span class="adr">
<span class="street-address">45 ABC Road</span><br>
<span class="extended-address">test1</span><br>
test2<br>
<span class="locality">xyz<br></span>
,
<span class="region">Berkshire<br></span>
<span class="postal-code">AB4 3DK</span><br>
<span class="country-name">United Kingdom</span></span>
</div>
</div>
comma is after <span class="locality">
edit:
code I've tried using replace all. which is not working
console.log( document.querySelector('div.crm-content'));
result = document.querySelector('div.crm-content');
content = result.replaceAll(",$", "");