A list of matches would be helpful I'm sure, but it would get confusing if there was also groups within the pattern...
Maybe the third operator could specify what format the results should be in
0: count of matches
1: text of first match
2: list of [matchedText,subgroups...]
3: list of texts of matches
4: list of [[matchedText,subgroups...],[],[]]
it would probably also help to get the index of the match too, maybe it could be a dict rather than a list
It would be nice if it was possible to match regexs and extract groups from them.
As a syntax suggestion, what if
:<str><str><falsey>
was regex testing as it is now, and:<str><str><truthy>
was matching.From PPCG chat:
A list of matches would be helpful I'm sure, but it would get confusing if there was also groups within the pattern... Maybe the third operator could specify what format the results should be in 0: count of matches 1: text of first match 2: list of [matchedText,subgroups...] 3: list of texts of matches 4: list of [[matchedText,subgroups...],[],[]] it would probably also help to get the index of the match too, maybe it could be a dict rather than a list