Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReplaceAll function in javascript

I am getting a string "test+test1+asd.txt" and i want to convert it into "test test1 asd.txt"

I am trying to use function str = str.replace("/+/g"," ");

but this is not working

regards, hemant

like image 362
NewDev Avatar asked Dec 18 '25 23:12

NewDev


1 Answers

str = str.replace(/\+/g," ");
like image 75
YOU Avatar answered Dec 20 '25 13:12

YOU



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!