-2

Replace <b> and </b> with space " " and <br> with \n

var a  = "Welcome to xyz. You have been added as a manager by <b>Adam </b>.<br><br><b>Dashboard Link:</b> https://app.xyz.com <br><br>Use the credentials below to sign-in: <br><b>Username : </b>a@k.com<br><b>Password : </b>qwerty";

var b = a.replace("<b>|</b>"," ").replace("<br>","\n");
console.log(b);
art
  • 226
  • 3
  • 11
  • 30

1 Answers1

0

@repeated see this you can use regular expression or slit and joint function to achieve it.for multiple character use regex

Eragon
  • 7
  • 2