Reputation: 1075
What does [.\\d\\D]*
mean.
I am trying to check a valid java main method statement by
java.matches("[.\\d\\D]*((public)\\s(static)\\s(void)\\s(main)\\((String)\\[\\]\\s(args)\\))[.\\d\\D]*");
what does that part mean?
Upvotes: 1
Views: 9806
Reputation: 785058
Well [.\d\D]*
means match:
0 or more of anyone of these properties
IMO this is not really required since this can effectively match anything and is equivalent of .*
with DOTALL switch.
Upvotes: 4