Java之正则表达式之简写符号


 // Pattern.
  /*  
       digits           : \d = [0-9]
       words            : \w = [A-Za-z0-9_]                   
       space characters : \s = [ \t\r\n\v\f]
       boundaries       : \b = (?<=\W)(?=\w)|(?<=\w)(?=\W)
  ______________________________________________________________
       https://en.wikipedia.org/wiki/Regular_expression
  */




最容易搞混的就是
        
         \sspace 而不是 string !

         \bboundary 而不是 blank !















-

猜你喜欢

转载自lixh1986.iteye.com/blog/2353388