Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

Add flag to Regex Match() to find all non-overlapping occurances of pattern

From time to time I have to look matches from long strings and usually regex is the method I will (would) use for. Below is an example where I try to find all words starting with f

Names Default To Here(1);

str2 = "which foot or hand fell fastest";
show(Regex(str2, "f[a-z]+")); // wanted result {"foot", "fell", "fastest"}

This will return me only the first match ("foot"). I would request a flag to be added, which could be used to find all possible non-overlapping occurrences, in similar manner as Python's re.findall works.


1 Comment
Level XI
show(Regex Match(str2, "(f[a-z]+)(t)","/1"));



Funny that Regex has this option GLOBALREPLACE, but Regex Match doesn't have an option GLOBALMATCH?