Re: [pcre-dev] pcre help required

Page principale
Supprimer ce message
Auteur: Aakash Jain
Date:  
À: pcre-dev
Sujet: Re: [pcre-dev] pcre help required
Thanks Philip...

If you can tell me one thing that would be very helpful for me.
I want to know that "is there any function in pcre distribution that can
generate random strings from regular expression(pcre) which are satisfied by
regular expression ?"

For ex. if regular expression is "abc{5}[a-z]?bcc"
then the function should generate :
abcccccbcc
abcccccgbcc
abccccczbcc
.
.
.

If it is not there, then can we use pcre_compile function to generate
strings ?

Thanks
Aakash


On Thu, Apr 16, 2009 at 2:11 PM, Philip Hazel <ph10@???> wrote:

> On Wed, 15 Apr 2009, Aakash Jain wrote:
>
> > I want to know the Algorithm used for compiling the regular expression
> and
> > how we are filling the code variable in the pcre structure ?
>
> It is rather complicated and the only way to understand it is to read
> the code and figure out how it does it. There are some notes about the
> format of the compiled pattern in the file HACKING in the PCRE
> distribution. I do not have the time (or, I'm afraid, the interest) in
> trying to explain it any more than that.
>
> Philip
>
> --
> Philip Hazel
>