Did you look at those regular expressions? Nobody, not even a senior, should be expected to rattle that off in an interview.
Besides, a regex like that in any codebase is a sign of something wrong. Code should be human readable. Obviously regular expressions fly in the face of that, but there's surely a limit to how far one goes with them in production-worthy code?
But you can make it human readable when wrapping it using a function, once the regex is tested in isolation, it can be used in production code without problems. I'm not auditing python regex engine each time I want to use the re module, and still that module is used in production code. If you restrict the solution space of a problem to what you can read and understand at the lowest level possible, maybe software would took ages to get into production... Of course, you can't solve every problem in sw using regexes, sometimes a simple looping solution solves the problem well enough to move on in development.
I had this funny experience once when I was applying for a Perl job and they asked me to analyse a 300 line sort routine... I guess that's their version of the regex
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Did you look at those regular expressions? Nobody, not even a senior, should be expected to rattle that off in an interview.
Besides, a regex like that in any codebase is a sign of something wrong. Code should be human readable. Obviously regular expressions fly in the face of that, but there's surely a limit to how far one goes with them in production-worthy code?
But you can make it human readable when wrapping it using a function, once the regex is tested in isolation, it can be used in production code without problems. I'm not auditing python regex engine each time I want to use the re module, and still that module is used in production code. If you restrict the solution space of a problem to what you can read and understand at the lowest level possible, maybe software would took ages to get into production... Of course, you can't solve every problem in sw using regexes, sometimes a simple looping solution solves the problem well enough to move on in development.
But there's still no way anyone would be able to write anything close to it in an interview.
I agree, and if you find yourself having to write that nonsense perl regex to get a job, it will be better for your mental health not getting it.
I had this funny experience once when I was applying for a Perl job and they asked me to analyse a 300 line sort routine... I guess that's their version of the regex