Date: Wed, 27 Oct 2004 13:22:23 -0700
From: Christopher Nebel <email@hidden>
Subject: Re: Native AS or grep via do shell script?
To: AppleScript Users <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On Oct 27, 2004, at 3:00 AM, Jakob Peterhänsel wrote:
Now, if only the CLI grep was as flexible as the one in BBEdit... :-/
Try using egrep or grep -E -- that turns on the extended regular
expression support. For instance, under egrep, your pattern could be
equivalently written like this:
[0-9]{2}-[0-9]{2}-[0-9]{4}
If you still feel deprived, you could use Perl instead, whose regular
expressions have all kinds of wacky features (not that you need most of
them here):
perl -ne 'print if /\d{2}-\d{2}-\d{4}/'
--Chris Nebel
AppleScript Engineering