public static final String digitsAndPlusOnly(MatcherCompat matcher){
  StringBuilder buffer=new StringBuilder();
  String matchingRegion=matcher.group();
  for (int i=0, size=matchingRegion.length(); i < size; i++) {
    char character=matchingRegion.charAt(i);
    if (character == '+' || Character.isDigit(character)) {
      buffer.append(character);
    }
  }
  return buffer.toString();
}

public static final String digitsAndPlusOnly ( MatcherCompat matcher ) { StringBuilder buffer = new StringBuilder ( ) ; String matchingRegion = matcher . group ( ) ; for ( int i = 0 , size = matchingRegion . length ( ) ; i < size ; i ++ ) { char character = matchingRegion . charAt ( i ) ; if ( character == '+' || Character . isDigit ( character ) ) { buffer . append ( character ) ; } } return buffer . toString ( ) ; }
convenience method to return only the digits and plus signs in the matching string .
