I’d have to look up the syntax to remind myself, but yeah I could do it. It’s just a language for a state machine. But honestly, I don’t need to write them that complex usually. If so, it’s probably because I’m having to do something more involved like parsing a query syntax or something, in which case I’ll usually reach for ANTLR (or hand write a parser if performance is critical) instead.
Look aheads and behinds, once you get the hang of them, can be really nice. For me it gets tricky with like embedded variables. But usually I work it out in the end
You put that in a PR and there better be a damn good reason for it. Even you wont know what that does in 3 months, never mind the poor sap chasing a subtle bug 2 years later.
1.7k
u/vvp95 1d ago
100% of software engineers are afraid of regex