protected String adaptRegexByLength(final String lengthPattern,final String withoutLengthPattern){
  if (maxWidth > 0 && maxWidth == minWidth) {
    return lengthPattern + "{" + maxWidth+ "}";
  }
 else   if (maxWidth > 0) {
    return lengthPattern + "{" + Math.max(0,minWidth)+ ","+ maxWidth+ "}";
  }
 else   if (minWidth > 0) {
    return lengthPattern + "{" + minWidth+ ",}";
  }
  return withoutLengthPattern != null ? withoutLengthPattern : lengthPattern;
}

protected String adaptRegexByLength ( final String lengthPattern , final String withoutLengthPattern ) { if ( maxWidth > 0 && maxWidth == minWidth ) { return lengthPattern + "{" + maxWidth + "}" ; } else if ( maxWidth > 0 ) { return lengthPattern + "{" + Math . max ( 0 , minWidth ) + "," + maxWidth + "}" ; } else if ( minWidth > 0 ) { return lengthPattern + "{" + minWidth + ",}" ; } return withoutLengthPattern != null ? withoutLengthPattern : lengthPattern ; }
adapts the lengthpattern by length modifiers and returns it . if length modifiers aren ' t specified the withoutlengthpattern is returned if given otherwise the unchanged lengthpattern .
