Re: an interesting challenge.

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Alex Dean
Date:  
To: Main PLUG discussion list
Subject: Re: an interesting challenge.
On Apr 5, 2006, at 10:49 PM, Kevin Brown wrote:

>> ok... for the title of REGEX MASTER... exactly how many words in
>> the english language have all 'i's directly before an 'e's except
>> after a 'c'( ie. you can have an i that is not following an e as
>> long as it is after a c )?
>
> grep -i '[^c]ie'


That wouldn't find a word that begins with 'ie' (if there are any).
You need a lookbehind assertion, but I'm not sure if grep will let
you do that.

The Perl version is '/(?<!c)ie/'.

alex
.



---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss