Revert 46f1770 to fix JENKINS-20037

46f1770 caused the regression in performance seen this issue: https://issues.jenkins-ci.org/browse/JENKINS-20037

Reverting to use the more conservative .matches reduces parse time back to a reasonable level.