News for hackers. Stuff that matters.
Re:The “Chad” bug by lmm on Saturday January 02, 2016 @05:08AM (#10825736)
I've never seen either of them in real-world code. Concatenation is something but I think it's a lot less flexible - if you have a parser for something and want to make a parser for a comma-separated list of that thing, with parser combinators that's one call, whereas with a regex I don't think the string-manipulation is straightforward, and would the named capture groups still work if they were now being hit multiple times?
Re:The “Chad” bug by omaranto on Saturday January 02, 2016 @12:46PM (#10826927)
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.)