[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `completion-in-region'

From: Stefan Monnier
Subject: Re: `completion-in-region'
Date: Sun, 11 Apr 2010 16:51:19 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>> I see that ido implements it by turning "abc" into the regexp
>> ".*a.*b.*c".  But matching this regexp against a string like
>> "abababababab" takes time O(N^3) where N is the length of the completion
>> candidate, which makes me a bit uneasy
> Does not "^a.*?b.*?c" give the same matches?

No because of the ^.  If you use ".*?a.*?b.*?c", then yes it gives the
same matches but it also has the same O(N^3) worst case.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]