You don't need .*
before href
and you're trying to escape your left parenthesis on your capturing group it looks like. You also missed escaping a quotation inside your replacement text, and left off your ending parenthesis )
at the end of your replaceAll function.
Try the following, this captures between your quotes and references to capture group $1
in the replacement.
myTooltipText.replaceAll("href\\s*=\\s*\"([^\"]*)\"", "href=\"javascript:void(0);\" onclick=\"openOrFocus('$1', 'windowName')\"");
See Working demo