import java.util.regex.* Pattern pat = Pattern.compile(".") println pat.matcher("hello").find()