Are you first timer at Why not join us and start exchange your programming knowledge with everyone. Register today!

JS - to remove all similar character from a string

0 votes
added Mar 18 in Javascript by lcjr First Warrant Officer (8,030 points)
edited Jul 25 by lcjr
const brandPath = path_arr[2];
// e.g lazacode-org
const brandName = brandPath.replace(/-/g,' ');

// will output lazacode org


Please log in or register to response this reference. - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.