You might use 4 capturing groups with a positive lookahead asserting 4 backreferences to match the uppercase chars between the parenthesis:
\b([A-Z])\w+ ([A-Z])\w+ ([A-Z])\w+ ([A-Z])\w+(?= \(\1\2\3\4\))
Regex demo
Instead of using \w
only, you could use the character classes that you use in the question like [-",/\\*&'\w]*
A more broad pattern could be repeating an uppercase char followed by 1+ word chars \w+
(or use \w*
to repeat 0+ word chars) and assert that what follows is only uppercase chars between parenthesis.
\b[A-Z]\w+(?: [A-Z]\w+)*(?= \([A-Z]+\))
Regex demo
If the number of chars are variable that you want to match between the parenthesis and they should match with the number of words before, you could use 2 capturing groups and compare the amount of splitted words with the number of uppercase chars between the parenthesis.
let pattern = /\b([A-Z][a-z]*(?: [A-Z][a-z]*)*) \(([A-Z]+)\)/;
let compare = (ar1, ar2) =>
ar1.length === ar2.length && ar1.every(
(value, index) => value === ar2[index].charAt(0)
);
[
"transmits Music Instrument Digital Interface (MIDI).",
"transmits Music Instrument Digital Interface (MADI).",
"transmits Music Instrument Digital Interface (MID)."
].forEach(s => {
let m = s.match(pattern);
let res = compare(m[2].split(''), m[1].split(' ')) ? "Ok -> " : "Not ok -> ";
console.log(res + s);
})