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

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: Praet Paul
CC: pcre-dev@exim.org
Subject: 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