Cannot use regex_match in select
Open
Nobody has claimed this yet.
stale
status:to be verified
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to do:
{{ list_of_strings | select('regex_match', something + 'somethingelse') }}
To avoid needing another task doing just:
echo '{{ list_of_strings }}' | grep '{{ something + 'somethingelse' }}'
But I'm told:
no test named 'regex_match'
Is that because regex_match is defined as a filter and not as a test ?
I couldn't find a way to use:
{{ list_of_strings | select('in', something + 'somethingelse') }}
To work either, is this expected to work ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how select resolves named tests, then inspect the registration and behavior of regex_match and in. Reproduce the two template examples with a minimal input and determine whether the expected result is supported; done means the behavior is fixed or clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100