Regex builder for Java.