There’s a built-in feature that Perl has that only a few of the languages claiming PCRE have actually done, and it makes things a lot more readable. The /x modifier lets you put in whitespace and comments. That alone helps a lot if you stick to good indentation practices.
If all other code was written like an obfuscated C contest, it would be horrible. For some reason, we put up with this on regex, and we don’t have to.
People have unironically done that. No, it isn’t better. The fundamental mental model is the same.
I honestly think it can be a lot more readable, especially when the regex would have been in the thousands of characters.
There’s a built-in feature that Perl has that only a few of the languages claiming PCRE have actually done, and it makes things a lot more readable. The
/x
modifier lets you put in whitespace and comments. That alone helps a lot if you stick to good indentation practices.If all other code was written like an obfuscated C contest, it would be horrible. For some reason, we put up with this on regex, and we don’t have to.
https://wumpus-cave.net/post/2022/06/2022-06-06-how-to-write-regexes-that-are-almost-readable/index.html
I want to see their unironic attempts, maybe they’re useful to me at least if they’re not better.
It’s not the fundemental model that I have a problem with for Regex, it’s the fucking brainfuck tier syntax
Here’s one example
fucking SOLD