Your regex
&tag=([A-Za-z\d]+)"
It's simplified (you escaped too much) and parenthesis were added to put the thing you want in group 1
In javascript this becomes
var myregexp = /&tag=([A-Za-z\d]+)"/;
var match = myregexp.exec(subject);
if (match != null) {
result = match[1];
} else {
result = "";
}
Explanation
Match the characters “&tag=” literally «&tag=»
Match the regular expression below and capture its match into backreference number 1 «([A-Za-z\d]+)»
Match a single character present in the list below «[A-Za-z\d]+»
Between one and unlimited times, as many times as possible, giving back as needed (greedy) «+»
A character in the range between “A” and “Z” «A-Z»
A character in the range between “a” and “z” «a-z»
A single digit 0..9 «\d»
Match the character “"” literally «"»