This string contains spaces followed by DOT(.
) and then some character. Then why regex is returning false?
String s=" .fds";
System.out.println(Pattern.matches("\\S+", s));
This string contains spaces followed by DOT(.
) and then some character. Then why regex is returning false?
String s=" .fds";
System.out.println(Pattern.matches("\\S+", s));