#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?ix)(?# Patrón de nombre multivariado)" & @CRLF & _
"\bJorge\s+((Alberto|A\.?)\s+)?/?(?P<Apellido>G[óo]mez)(\s+(Prada|P\.?))?\b"
Local $sString = "(1)Jorge Alberto Gómez Prada = (2)Jorge Gómez = (3)Jorge A Gómez = (4)Jorge A. Gómez P. " & @CRLF & _
"(5)(Jorge GOMEZ P.a) ... (6)Alberto jorge GÓMEZ (7)Jorge /Gómez" & @CRLF & _
"(8)>>Jorge A" & @CRLF & _
"Gómez P<< (9)Jorge Gómez Pradas (10)JJorge Gómez (11) Luis Jorge Gómeza"
Local $sSubst = "Amparo \g<Apellido>"
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