I need to replace all <a> with <span> tag from a string .
code:
var a = input.replace(/<a>/g, "'<span>");
var b = a.replace(/<\/a>/g, "</span>");
var c = b.replace(/href/g, "title");
but it not worked for me and I could not add style as well
Input : Angular is a platform for building mobile and desktop web applications.
<a href="http://www.google.com">Test Link</a> Achieve the maximum speed possible on the Web Platform today, and take it further, via Web Workers and server-side rendering.
<a href="http://www.google.com">Test Link Two</a>
Output : Angular is a platform for building mobile and desktop web applications.
<span style="color:#0000EE" title="http://www.google.com">Test Link</span> Achieve the maximum speed possible on the Web Platform today, and take it further, via Web Workers and server-side rendering.
<span style="color:#0000EE" title="http://www.google.com">Test Link Two</span>.
can anyone help me to fix this .