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

Top Page
Delete this message
Author: Praet Paul
Date:  
To: pcre-dev@exim.org
Subject: Re: [pcre-dev] determine if regular expression only matchesfixed-length strings
Hi Philip,

That is indeed the behavior I am looking for :-)

Best Regards,

Paul

-----Original Message-----
From: Philip Hazel [mailto:ph10@hermes.cam.ac.uk]
Sent: donderdag 2 september 2010 18:39
To: Praet Paul
Cc: pcre-dev@???
Subject: Re: [pcre-dev] determine if regular expression only matches fixed-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