Skip to content

Improve docs on regex filters#67133

Merged
dwoz merged 1 commit intosaltstack:3006.xfrom
terminalmage:jinja-filter-docs
Jan 30, 2025
Merged

Improve docs on regex filters#67133
dwoz merged 1 commit intosaltstack:3006.xfrom
terminalmage:jinja-filter-docs

Conversation

@terminalmage
Copy link
Contributor

When capture groups are not used, the filter will always return something that will evaluate as boolean False (because lack of capture groups means an empty tuple is returned for regex matches). This commit improves the docs, clarifying this and recommending how to use this filter to correctly identify if the pattern matched.

When capture groups are not used, the filter will always return
something that will always evaluate as boolean False (because lack of
capture groups means an empty tuple is returned for regex matches). This
commit improves the docs, clarifying this and recommending how to use
this filter to correctly identify if the pattern matched.
@dwoz dwoz merged commit 29d83c1 into saltstack:3006.x Jan 30, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants