On Mon Dec 11 02:04:12 2006, bugs@bereft.net wrote:
Show quoted text>
> > It seems that it works OK if there are less than of ten characters
> > before the [...] group. If there are ten characters or more than the
> > [...] group is returned unprocessed.
>
> There's a bit of bogosity around the strings implementation, there are
> two work-arounds though. Firstly, you can use the second argument to
> strings:
>
> perl -Ilib -MRegexp::Genex -le 'print
> +(Regexp::Genex::strings("1234567890[i]",20))[0]'
>
> Or you can globally set $Regexp::Genex::DEFAULT_LEN=20:
>
> perl -Ilib -MRegexp::Genex -le '$Regexp::Genex::DEFAULT_LEN=20;print
> +(Regexp::Genex::strings("1234567890[i]"))[0]'
>
>
> This is the implementation leaking through, "strings" matches a generated
> pattern against a string of "a" x ($_[1] || $DEFAULT_LEN). It may be
> possible to make the selection of the number of "a"s smarter somehow, as
> it could be in this case. I'll consider it... would it be useful to
you, or
Show quoted text> are the above work-arounds sufficient?
>
For now, I can live with the workaround. As an approximation, maybe the
default length should just be set to max($DEFAULT_LEN,length($rx)) ?
Regards,
Slaven