regexall(pattern, string) applies the RE2 regular expression pattern to string and returns all matches as a list. Each element has the same shape as a single regex result: a string for no-capture-group patterns, or a tuple/object for patterns with capture groups.
Signature
Example
Find all GitHub issue references in a commit message and include them in the release notes command:"Fixes #123 and #456 closes #789", computed.issue_refs becomes ["#123", "#456", "#789"].
Notes
regexallreturns an empty list when there are no matches. This makes it safe to use in conditions withlength.- Each match element is a string when the pattern has no capture groups. With capture groups, each element is a tuple of the captured values (or an object for named groups).
- Use
regexwhen you only need the first match.