We don't bite newbies here... much | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
So, if I understand this correctly, you are saying that my code works, but there is some constraint that it has to be in one single regex? If that's the case, then we are into some obfuscated code problem and this is perhaps the wrong place?
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
|
|