Add regex_findall (#19214)

Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Chris Browet 2021-09-22 19:45:14 +02:00 committed by GitHub
parent b3d1c2c2e2
commit 1dec3ab4fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -518,7 +518,8 @@ Some of these functions can also be used in a [filter](https://jinja.palletsproj
- Test `string is match(find, ignorecase=False)` will match the find expression at the beginning of the string using regex.
- Test `string is search(find, ignorecase=True)` will match the find expression anywhere in the string using regex.
- Filter `string|regex_replace(find='', replace='', ignorecase=False)` will replace the find expression with the replace string using regex.
- Filter `string|regex_findall_index(find='', index=0, ignorecase=False)` will find all regex matches of find in string and return the match at index (findall returns an array of matches).
- Filter `value | regex_findall(find='', ignorecase=False)` will find all regex matches of the find expression in `value` and return the array of matches.
- Filter `value | regex_findall_index(find='', index=0, ignorecase=False)` will do the same as `regex_findall` and return the match at index.
## Processing incoming data