javascript in link html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>repl.it</title>
</head>
<body>
<a href="javascript:'https://' + 'google.com/' + /a(.)/.exec('ar')[1]">https://foo.com</a>
</body>
</html>