Java pattern match library