#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)<a ?.*? href="(?:(?:.*?example\.com.*?)|(?:[^\.]*?))".*?>(.*?)<\/a>"
Local $sString = "<a href="https://example.com/page_url" data-some-id="" data-other-prop="">Link 1</a>" & @CRLF & _
"<a data-href="" href="http://Go to page" data-another-id="">Link 2</a>" & @CRLF & _
"<a data-other="" href="/Go to page" data-val-id="">Link 3</a>" & @CRLF & _
"<a href="http://example123.com/page" data-props-id="">Link 4</a>"
Local $sSubst = "$1"
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm