##### SUMMARY
I think the `regex_replace` jinja filter should support `multiline` as the `regex_search` do.
Or maybe use a `flags` parameter to support any `re` flag.

##### ISSUE TYPE
- Feature Idea

##### COMPONENT NAME
- `lib/ansible/plugins/filter/core.py`

##### ADDITIONAL INFORMATION
Example: comment a multiline variable.
```yaml
  val: "{{ val | regex_replace('^', '#', multiline=True) }}"
```
if morekeys is None:
        keys = [item]
    elif isinstance(morekeys, list):
        keys = [item] + morekeys
    else:
        keys = [item, morekeys]
    value = container
    for key in keys:
        value = environment.getitem(value, key)
    return value
@environmentfilter
def do_groupby(environment, value, attribute):
    """Overridden groupby filter for jinja2, to address an issue with
    jinja2>=2.9.0,<2.9.5 where a namedtuple was returned which
    has repr that prevents ansible.template.safe_eval.safe_eval from being
    able to parse and eval the data.
    jinja2<2.9.0,>=2.9.5 is not affected, as <2.9.0 uses a tuple, and
    >=2.9.5 uses a standard tuple repr on the namedtuple.
    The adaptation here, is to run the jinja2 `do_groupby` function, and
    cast all of the namedtuples to a regular tuple.
    See https://github.com/ansible/ansible/issues/20098
    We may be able to remove this in the future.
    """
    return [tuple(t) for t in _do_groupby(environment, value, attribute)]
def b64encode(string, encoding='utf-8'):