an interesting challenge.
Alex Dean
alex at crackpot.org
Thu Apr 6 06:56:50 MST 2006
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
.
More information about the PLUG-discuss
mailing list