const regex = new RegExp('(?# Patrón de nombre multivariado)
\\bJorge\\s+((Alberto|A\\.?)\\s+)?/?(?P<Apellido>G[óo]mez)(\\s+(Prada|P\\.?))?\\b', 'gi')
const str = `(1)Jorge Alberto Gómez Prada = (2)Jorge Gómez = (3)Jorge A Gómez = (4)Jorge A. Gómez P.
(5)(Jorge GOMEZ P.a) ... (6)Alberto jorge GÓMEZ (7)Jorge /Gómez
(8)>>Jorge A
Gómez P<< (9)Jorge Gómez Pradas (10)JJorge Gómez (11) Luis Jorge Gómeza`;
const subst = `Amparo \g<Apellido>`;
// The substituted value will be contained in the result variable
const result = str.replace(regex, subst);
console.log('Substitution result: ', result);
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 JavaScript, please visit: https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions