Simple Java program to test regular expression