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.
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