Java regex utility assignment