Code example for Matcher

Methods: group, matches

0
      String width = elem.getStyle().getProperty(dim);
      if (width == null) {
         return 0; 
      } 
      Matcher m = PATTERN.matcher(width);
      if (m.matches()) {
         return Integer.parseInt(m.group(1));
      } 
      return 0; 
   } 
 
}