3 ms·
Regular expressions can be written verbosely and with comments; you don't need to write them like line noise, any more than you need to do so with normal code.
by weavejester 4y ago
Regular expressions can be written verbosely and with comments; you don't need to write them like line noise, any more than you need to do so with normal code. Regular expressions also have the significant advantages of being both pure and guaranteed to terminate. There's even libraries (like re2) that guarantee termination in linear time.
It's insane to write code to text search when a regular expression could be reasonably used instead. This article is objectively bad advice and should not be followed.