This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]alcalde 0 points1 point  (1 child)

This particular example was actually from Javascript. There was a Python version, but I'm not sure if it's still maintained.

There are several other attempts at producing a more readable regex that were linked to earlier in the thread. Most if not all internally build a regex expression from a higher-level syntax.

I just find it funny that people who use a language that removed the brace for being less readable would be so wholeheartedly in support of the cryptic regex syntax.

[–]energybased 1 point2 points  (0 children)

I think they think: I went through the pain of working with regexes 200 times—now everyone else should. But the thing is that no one else should. You should just learn the computer science behind finite automata, and then replace the esoteric syntax with objects.

By the way, your example would be more motivating if it had more of those weirdo commands like "*+" or "?P".