This pull request proposes a small performance improvement. Compilation of a regular expression pattern is a relatively "heavy" process. Since we use the same pattern in the loop it's possible to just compile it once and then re-use it. The other notable change is the upgrade of the JUnit to the latest version from 4.x branch. Since the functionality was not changed, the pull request doesn't have any changes to the tests.
This pull request proposes a small performance improvement. Compilation of a regular expression pattern is a relatively "heavy" process. Since we use the same pattern in the loop it's possible to just compile it once and then re-use it. The other notable change is the upgrade of the JUnit to the latest version from 4.x branch. Since the functionality was not changed, the pull request doesn't have any changes to the tests.