If we are talking about clarity and performance, then that's different. Fewer lines of Perl code doesn't always equal faster performance. I simplified this stuff like must match exactly 4 times, etc. This speeds up the regex engine. As far as clarity goes, I would struggle to be more clear (I'm not a guru).
If you are interested in performance, then measure and test performance (run benchmarks).
Counting the number of lines of source code is a relatively poor predictor of actual code performance.
Update: Well it just took some few seconds to get a negative vote on this post. I was genuinely trying to help with the original problem. I don't understand this requirement for "one line". I think that benchmarking and testing is the right way to go. I would be happy to help in this regard.
In reply to Re^3: regex: extract multiple number of date patterns from certain lines
by Marshall
in thread regex: extract multiple number of date patterns from certain lines
by Random_Walk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |