Делайте это просто глупо (KISS).
\b(\w)[-'\w ]+\(\1[A-Z]+\)
Чтобы лучше обрабатывать такие случаи, как standard that establishes specifications cables (SC)
и so for instance secure socket layer (SSL)
, одного RegEx недостаточно. Используйте следующий сценарий.
const text = "The Universal Serial Bus (USB) is an industry standard that establishes specifications cables (SC) and connectors protocols(CP) whoa this is a for connection found (CF) Keep it simple stupid (KISS)! so for instance secure socket layer (SSL) Couldn't match start-of-frame (SOF) , start-of-frame (SoF), Carrier-sense multiple access with collision detection (CSMA/CD), Universal Serial Bus Test and Measurement Class (USBTMC) AND how do I allow 2 level abbreviations Battery Charging (BC), communication channel (CC) Could you please help! Pain in Grief (PG) Carrier-sense multiple access with collision detection (CSMA/CD)";
const regex = new RegExp(text.match(/\([A-Z\/]+(?=\))/g).map(m =>
m.split("").slice(1).map(i => i.replace(/\//g, "") + "\\S*").join("(?:\\s+(?:(?:and|in|with)\\s+)?|\\s*[-&]\\s*)")
.concat("\\s*\\" + m + "\\)")
).join("|"), "gi");
let match;
while (match = regex.exec(text)) {
console.log(`${regex.lastIndex - match[0].length}-${regex.lastIndex}: ${match[0]}`);
}