Wu Yuxiong - natural born JAVA development of learning: Regular Expressions

Import the java.util.regex *. ; 
 
class RegexExample1 {
    public  static  void main (String args []) { 
      String Content = "noob the I AM" + 
        "from runoob.com." ; 
 
      String pattern = "* * runoob.." ; 
 
      Boolean IsMatch = Pattern.matches (pattern, Content); 
      System.out.println ( "contains the string 'runoob' substring?" + IsMatch); 
   } 
}

updating..........

 

Guess you like

Origin www.cnblogs.com/tszr/p/10960443.html