Looking abit closer at the a|b|cd example, you also accept an empty string with your pattern.
That said, I just tested the relevant parts of your code, with my expression, and it works just fine for me.
Unfortunately, you can't get any error messages as for why your pattern didn't match your string. Regular expressions is a tedious game of trial, frustration, and error.
A few more remarks anyway;
There's no point in creating a bracket expression containing a single character, it just clutters your expression. Bracket expressions is best used to match a range of characters, such as a-z or 0-9.
Back references are powerful, but they can make the expression harder to follow. Especially when you place them within a bracket expression.
Thanks for your insight on this. In this case, i will leave this thread as unsolved for the time being (although in current, it works as expected), and I will try to implement you recommendations. I will leave this part of the entire script to the last, since it seems that this regex will be very time consuming. ( I need to add various regex solutions to another 10 - 20 commands), so i will work on the regex in between as much as time allows and finish off all the non-regex things on my to-do list for now.
My main goal in this is to get rid of all the escapes, that would indeed make the regex syntax much shorter, and more readable.