$ 0 0 String s = "maulik"; Pattern p = Pattern.compile("[^a-zA-Z0-9]"); boolean hasSpecialChar = p.matcher(s).find();