On Tue, May 02, 2006 at 08:27:49PM +0300, Yakov Lerner wrote: > On 5/2/06, o1792 <[EMAIL PROTECTED]> wrote: > BTW, can anyone explain why this pattern does *not* > work, does not match words that do not end with 'ion' : > /\i\+\(ion\)[EMAIL PROTECTED]/ > I thought this pattern would match words not ending with > 'ion'. But it matches all words, including words ending > with 'ion'. Why ?
That pattern will match as long as you don't force it to leave 3 characters after the negation. Given the word description: descript.ion <-- won't match because \(ion\)[EMAIL PROTECTED] matches AT that point description. <-- works just fine because there's no 'ion' at the current position /\i\+\(ion\)[EMAIL PROTECTED]> The above pattern will do what you wanted since it forces there to be 3 more characters and the end of word when you try to match 'ion'. James -- GPG Key: 1024D/61326D40 2003-09-02 James Vega <[EMAIL PROTECTED]>
signature.asc
Description: Digital signature