java - String:matchs.method something not clear[RESOLVED] -


Hello, I was made purely a code for a program, but there are some Iyyues ... I understand everything Except that this is the one, please tell me about that thing ...

  ". * \\ d." " 

It holes code

  public void Czech (String w) {this.w = w; {if (w.matches (". * \\ d. * ")) {System.out.println (" try to include a number, Re .... (then 2 PAC) ");} Else {System.out.println (" Alright " + "& gt;" + w + "& lt;" + to "go and fuck ..."); runL = 3;}} while (run L == 2);}  

And for example what I can write if I want to find: $ "% & amp; /?

Please let me know the source of this topic but I have not found anything useful

And if my English is bad, then tell: D

The method matches a regular expression. There are many good resources describing regular expressions. In this specific case ". * \\ d. *" match anything in which there is at least 1 digit \ d anywhere in the string.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -