3 ms·
It sounds like you have an illegible, compact regex in mind. If you write regexes like that for others to read, I feel sorry for the other people. If you write
by kqr 5y ago
It sounds like you have an illegible, compact regex in mind. If you write regexes like that for others to read, I feel sorry for the other people.
If you write the regex like you would production code, i.e. with whitespace, newlines, and comments[1], I imagine 200 lines of regex would be about the same as 200 lines of any other type of production code, be it APL, Haskell, or conjunctive normal form.
I realise this is a bit of a circular argument: if you write the code such that 200 lines is about n units of review in a specific language, then 200 lines will be about n units of review in any language. But that's also kind of the point. There's a very specific logic density that you can accomplish for production code to be readable, and that results in about that density being reviewed.
[1]: In Python you can do this with the re.VERBOSE flag, in other languages you can do it by breaking the regex apart into separate variables that are then combined together.