Your biggest mistake is replacing a long regex that is
nearly impossible to understand with an even longer one that is
actually impossible to understand. Since you're rewriting the expression anyway, take the opportunity to expand and comment it using /x.
You want your finished product to be good code, not "a mess like before, except worse".