static int getTailLength(SearchTaskOptions options) {
    return options.regularExpression ? Integer.MAX_VALUE : options.stringToFind.length() - 1;
  }
static int getTailLength(SearchTaskOptions options)