code: function replaceRegex(match, replace, flags) {
    if (arguments.length < 2) {
      throw new Error('no match and replace for replace regex');
    }
    return (flags === void 0) ?
        apply('ml.replace-regex', match, replace) :
        apply('ml.replace-regex', match, replace, flags);
  }
docs: Applies a regular expression to the existing value to produce a new value for
  a {@link patchBuilder#replace} operation.
  @method
  @since 1.0
  @memberof patchBuilder#
  @param {string} match - the expression extracting parts of the existing value
  @param {string} end - the expression to assembling the extracted parts into
  a replacement value
  @param {string} [flags] - the flags changing the regex operation
  @returns {patchBuilder.ApplyDefinition} the specification for applying a function