Allowing brackets [] in regex

Okay, so I've got two issues I need help with. Warning, I'm an absolute beginner who, for the most part, has no idea what he's doing.

--------------------------------------------------------------------
Issue 1:
The first is a small one with Jeneeus Guruman's Graphics Auto-Changer.

It's working, with one exception:
When I use a facename file that contains brackets, it doesn't work.
So if I use: for
Code:
 <fe: actor_id, face_name, face_index>
Code:
 <fe: 1, MyFace, 0>
it correctly assigns Slot 0 of the MyFace.png to the Actor 1.
But If I instead use...
Code:
 <fe: 1, MyFace[BUST][Exp5x2], 0>
then it doesn't.

That's unfortunate, because the [] expressions are necessary for another plugin to work and read them, so not having them is not an option.

My suspicion is the issue lies in the original code when the name is read:
Code:
Game_Actor.prototype.getFaceChange = function(item) {
    var re = /<fe[:]?\s*(\d+)\s*[,]?\s*([$]*\w+)?\s*[,]?\s*(\d+)\s*>/gi;
    do {
        var match = re.exec(item.note);
        if (match && match[1] == this._actorId) {
          return {name: match[2], index: match[3]};
        }
    } while (match);
    return;
};
I suspect that this is a regular expression used to split the name into parts and read out what's neccessary?
Is there a way to modify this part in order to allow it to read [BUST] and [Exp5x2] as if they are normal parts of the name like all other letters?

I'd really appreciate it if someone could help me with this issue.
I'm only on for a fleeting visit so I don't have time to look at Mog's plugin and have no experience with it, but regarding the regex if you replace it with this:

Code:
var re = /<fe:?\s*(\d+)\s*,?\s*(\$*[\w\[\]]+)?\s*,?\s*(\d+)\s*>/gi;

It should read your "[" and "]" characters as well as normal letters.
I'm only on for a fleeting visit so I don't have time to look at Mog's plugin and have no experience with it, but regarding the regex if you replace it with this:

Code:
var re = /<fe:?\s*(\d+)\s*,?\s*(\$*[\w\[\]]+)?\s*,?\s*(\d+)\s*>/gi;

It should read your "[" and "]" characters as well as normal letters.
Works like a charm, thank you. 😀

-------------------------------------------------------------------------------------------

Hoping someone can help me with issue 2, too.
you should post different questions in different threads.
you should post different questions in different threads.
Alright, my thinking was not to spam the forum with multiple threads, but I can see why that may be the better way to go about, given others might want to find specific information.
Sorry. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/allowing-brackets-in-regex.114858/