Minor performance tweaks

git-svn-id: https://svn.apache.org/repos/asf/maven/shared/trunk@1516882 13f79535-47bb-0310-9956-ffa450edef68
Used compiled regexes

git-svn-id: https://svn.apache.org/repos/asf/maven/shared/trunk@1516883 13f79535-47bb-0310-9956-ffa450edef68