No I think you get me wrong, my reply wasn't meant to sound flippant.
I never said less written code == faster, neither did I suggest that using regex was more cool - that's some odd bias of yours I'm afraid.
Less written code can == easier to read, and easier to read may == easier to maintain. That seems as valid a reason as any, though an equally valid point might be regex != readable - there's no simple answer.
I would like to learn as much as possible about about perl, and I thought there should be a regex solution that would give a more compact solution - I attempted a solution which didn't quite work, and some of the replies have given me a greater insight into regex.
I did say thanks for the reply, and the question did have "regex" in the title, so you'll have to forgive me if I can't understand why you're so pissed off - don't worry I won't follow up on this thread and waste any more time.
Thanks to everyone, including yourself, for the useful answers you've all given. |