Note that by default the regex test is identical to match, but can do much more (#50205)

* Note that the regex test behaves like 'match', with default settings
This commit is contained in:
Jim Rollenhagen 2019-05-07 11:00:01 -04:00 committed by Alicia Cozine
parent beca3661a4
commit 86e98c5213

View file

@ -59,8 +59,7 @@ To match strings against a substring or a regular expression, use the "match", "
msg: "matched pattern 4"
when: url is regex("example.com/\w+/foo")
'match' requires zero or more characters at the beginning of the string, while 'search' only requires matching a subset of the string.
'match' requires zero or more characters at the beginning of the string, while 'search' only requires matching a subset of the string. By default, 'regex' works like `search`, but `regex` can be configured to perform other tests as well.
.. _testing_versions:
@ -266,5 +265,3 @@ The following tasks are illustrative of the tests meant to check the status of t
Have a question? Stop by the google group!
`irc.freenode.net <http://irc.freenode.net>`_
#ansible IRC chat channel