javascript - How to remove comma before special character using jquery -


my string :-

var str = #805|6412,6413,#803|6392,6393,#802|6382,6383,6384,#96|622,623,#88|589,592,#810|6461,6462,6464 

now want remove comma before every (#) sign ?

try this. replace ,# #. removing ,s before # character.

var str = "#805|6412,6413,#803|6392,6393,#802|6382,6383,6384,#96|622,623,#88|589,592,#810|6461,6462,6464"; str = str.replace(/,#/g, '#'); 

Comments

Popular posts from this blog

Upgrade php version of xampp not success -

amazon web services - S3 and apache mod_proxy with basic authentication -

powershell - This solution contains one or more assemblies targeted for the global assembly cache -