JSFiddle - React, Tailwind, and code Playground

JavaScript

str = '<a href="http://google.com" rel="nofollow" target="_blank">Google shmoogle</a>';
new_str = str.replace( /<a href="(.*?)".*>(.*)<\/\a>/, '$2 $1' );
alert( new_str );