This regex matching would be worth testing in a JUnit test.