[Israel.pm] little bit O.T. :Perl regex vs grep regex
Yuval Yaari
yuval at windax.com
Wed Nov 10 14:19:08 PST 2004
Offer Kaye wrote:
>I beg to differ :-)
>The people most likely to use "grep" -- beginners -- are the people
>least likely to know about "perl -ne'' , or be comfortable using it.
>Better that they practise Perl RE's in a familiar setting, after that
>they can graduate to using "perl -ne", "perl -pe", 'perl -an -F":"
>-e', and the rest of the zoo :-)
>
I'd have to agree with Offer.
I personally use the rest of the zoo :)
(BTW: http://www.perl.com/pub/a/2004/10/14/file_editing.html)
Grep was mentioned, I wondered what held him back from using -P (except
for not having GNU grep). I guess he's using GNU grep anyway...
I also suggested to RTFM, so if -P is not in his "friendly" manual, he
should know his grep wouldn't support it.
And now for more important stuff: how much slower is PCRE compared to
Perl's "built-in" regex engine?
Any benchmarks? :)
--Yuval
More information about the Perl
mailing list