4 ms·
You're definitely right that concatenation is less composable, and I agree that parser combinators are more powerful. I was just pointing out there are somethin
by omaranto 11y ago
You're definitely right that concatenation is less composable, and I agree that parser combinators are more powerful. I was just pointing out there are somethings you can do in regexes to make things more readable.
And about captures inside repetition: I don't see any reason they couldn't capture a list of strings instead of a string in dynamically typed languages but in all regex libraries I'm aware of they do something that seems useless to me: they only capture the last occurrence! (They probably just overwrite the capture on each repetition.)