Re: [pcre-dev] Non-capturing group overhead (100x)

Αρχική Σελίδα
Delete this message
Συντάκτης: ph10
Ημερομηνία:  
Προς: zatlas1@yahoo.com
Υ/ο: pcre-dev@exim.org
Αντικείμενο: Re: [pcre-dev] Non-capturing group overhead (100x)
On Tue, 5 Dec 2017, Ze'ev Atlas via Pcre-dev wrote:

> Couldn't we recognize (?:.*) as what it really is, i.e .*


Well, yes, but that is only one example of a pattern that is unlikely to
be encountered in practice but which could be simplified. How about
(?:.*|.*) for example? Zoltán has some ideas for general optimizations,
though he said he's too busy to pursue them at present. There are less
silly examples, some of which are discussed in Friedl.

Philip

--
Philip Hazel