I'm trying to make something pretty simple, but I simply suck at regular expressions.
My goal is to replace :
<a href="http://www.google.com">Link To Google</a>
To :
<b>Link To Google</b>
In java.
I tried this :
String input = "<a href=\"http://www.google.com\">Link to Google</a>";
String Regex1 = "<a href(.*)>";
String Regex2 = "</a>";
String output = test.replace(Regex1, "<b>");
output = test.replace(Regex2, "</b>");
But the first Regex1 is not matched with my input. Any clue ?
Thanks in advance!