code: public static <E> RegularExpression<E> compile(final String expression,
              final Function<String, BaseExpression<E>> factoryDelegate) {
          return new RegularExpressionParser<E>() {
              @Override
              public BaseExpression<E> factory(String token) {
                  return factoryDelegate.apply(token);
              }
          }.parse(expression);
      }
docs: *
  Create a regular expression from the specified string.
  @param expression
  @param factoryDelegate
  @return