Re: [pcre-dev] determine if regular expression only matches…

Αρχική Σελίδα
Delete this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: Praet Paul
Υ/ο: pcre-dev@exim.org
Αντικείμενο: Re: [pcre-dev] determine if regular expression only matchesfixed-length strings
On Thu, 2 Sep 2010, Praet Paul wrote:

> Does PCRE offer a way of determining if the regular expression only
> matches fixed-length strings ?


Not at present. I think it would be fairly easy to add such a feature,
because it just has to remember whether any non-fixed quantifiers were
encountered while compiling. But would this be useful? A pattern such as
A|BC|DEF would come out as "matches fixed-length strings", but they are
not all the same length.

Philip

--
Philip Hazel