You have matching count of open/close parenthesis but they're mis-matched, so the $regex ends right after the question. Also, after you fix that, if $1- contains color codes which are not part of a wildcard string you may need to use $strip($1-)