Regexpes exist to avoid cumbersome code like this, to make it less error prone. Makes me sad to see so many upvotes.
I get that some people have a hard time understanding regexpes with all the backtracking and greediness. Yes, syntax is a bit complicated. Maybe simplified predictable default mode could help. But there is no problem with DSL being used as an abstraction. In fact, we need more DSLs, for everything!
Comments
Regexpes exist to avoid cumbersome code like this, to make it less error prone. Makes me sad to see so many upvotes.
I get that some people have a hard time understanding regexpes with all the backtracking and greediness. Yes, syntax is a bit complicated. Maybe simplified predictable default mode could help. But there is no problem with DSL being used as an abstraction. In fact, we need more DSLs, for everything!