JSFiddle - React, Tailwind, and code Playground
HTML
<a href="">https://www.google.ru/?gws_rd=ssl</a><br>
<a href="">http://www.google.ru/?gws_rd=ssl</a><br>
<a href="">https://www.google.ru/?gws_rd=ssl</a><br>
<a href="">http://www.google.ru/?gws_rd=ssl</a><br>
<a href="">https://www.google.ru/?gws_rd=ssl</a><br>
<a href="">http://www.google.ru/?gws_rd=ssl</a><br>
<a href="">https://www.google.ru/?gws_rd=ssl</a><br>
<a href="">http://www.google.ru/?gws_rd=ssl</a><br>
<a href="">https://www.google.ru/?gws_rd=ssl</a><br>
<a href="">http://www.google.ru/?gws_rd=ssl</a><br>
<a href="">https://www.google.ru/?gws_rd=ssl</a><br>
<a href="">http://www.google.ru/?gws_rd=ssl</a><br>
<a href="">https://www.google.ru/?gws_rd=ssl</a><br>
<a href="">http://www.google.ru/?gws_rd=ssl</a><br>
JavaScript
function replaceLinksProtocol() {
var links = document.getElementsByTagName('a');
for (var i = 0; i < links.length; i++) {
links[i].innerHTML = links[i].innerText.replace(/(^\w+:|^)\/\/www./, '');
}
}
replaceLinksProtocol();