diff options
author | Brian Coca <bcoca@users.noreply.github.com> | 2024-12-10 16:51:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-10 16:51:49 +0100 |
commit | 3fffddc18305f4d910774b57bc90e14456e7a15b (patch) | |
tree | d8728153c6fb87f0872143fca14c661d39a63371 | |
parent | Make sure we are always using Lock from our multiprocessing context (#84453) (diff) | |
download | ansible-3fffddc18305f4d910774b57bc90e14456e7a15b.tar.xz ansible-3fffddc18305f4d910774b57bc90e14456e7a15b.zip |
Added None/empty notes to regex_search (#84437)
-rw-r--r-- | lib/ansible/plugins/filter/regex_search.yml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ansible/plugins/filter/regex_search.yml b/lib/ansible/plugins/filter/regex_search.yml index e9ac11d949..e0eda9ccc0 100644 --- a/lib/ansible/plugins/filter/regex_search.yml +++ b/lib/ansible/plugins/filter/regex_search.yml @@ -8,6 +8,9 @@ DOCUMENTATION: - Maps to Python's C(re.search). - 'The substring matched by the group is accessible via the symbolic group name or the ``\{number}`` special sequence. See examples section.' + - The return for no match will be C(None) in most cases, depending on whether it is used with other filters/tests or not. + It also depends on the Jinja version used and whether native is enabled. + - "For a more complete explanation see U(https://docs.ansible.com/ansible-core/devel/reference_appendices/faq.html#why-does-the-regex-search-filter-return-none-instead-of-an-empty-string)." positional: _input, _regex options: _input: @@ -52,5 +55,5 @@ EXAMPLES: | RETURN: _value: - description: Matched string or empty string if no match. + description: Matched string or if no match a C(None) or an empty string (see notes) type: str |