How to remove the underscores from a string with regex in Node.js

1 Answer

0 votes
let str = 'nodejs_c_c++_php';
 
str = str.replace(/_/g, '');
 
console.log(str);
 
   
   
   
   
/*
run:
   
nodejscc++php
   
*/

 



answered Apr 27, 2022 by avibootz
...