How do I write more maintainable regular expressions?
问题 I have started to feel that using regular expressions decreases code maintainability. There is something evil about the terseness and power of regular expressions. Perl compounds this with side effects like default operators. I DO have a habit of documenting regular expressions with at least one sentence giving the basic intent and at least one example of what would match. Because regular expressions are built up I feel it is an absolute necessity to comment on the largest components of each