Fixed a regex matcher
(cherry picked from commit 8fbb304)