mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Correct match test documentation (#50229)
Match test matches zero or more characters at the begining of the string. Fixes: #32366 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
fc5ea7c999
commit
14eba662c8
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/32366-test-match_fix_docs.yaml
Normal file
2
changelogs/fragments/32366-test-match_fix_docs.yaml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- Fix documentation of match test. Match requires zero or more characters at beginning of the string.
|
|
@ -59,7 +59,7 @@ To match strings against a substring or a regular expression, use the "match", "
|
||||||
msg: "matched pattern 4"
|
msg: "matched pattern 4"
|
||||||
when: url is regex("example.com/\w+/foo")
|
when: url is regex("example.com/\w+/foo")
|
||||||
|
|
||||||
'match' requires a complete match in 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.
|
||||||
|
|
||||||
|
|
||||||
.. _testing_versions:
|
.. _testing_versions:
|
||||||
|
|
Loading…
Reference in a new issue