[Israel.pm] little bit O.T. :Perl regex vs grep regex

Yuval Yaari yuval at windax.com
Wed Nov 10 11:40:06 PST 2004


Sagiv Barhoom wrote:

>hi all,
>I hope this is not too mach off topic,
>is there any CLI tool that equals to the bash command line tool "grep"
>but with the power of perl regexes?
>
>for example:
>
>$ ls -l| grep ^[^a-zA-Z]
>-rw-rw-r--    1 sagivba  sagivba     80384 אוק 22 14:55 Additions-Chapter7_1.doc
>
>but "\W" does not work:
>
>$ ls -l| grep ^\W
>[sagivba at 80 Desktop]$
>
grep -P
Read The Friendly Manual.

  --Yuval



More information about the Perl mailing list