Test java regext pattern