[EMAIL PROTECTED] wrote:
> James Stroud wrote:
> > You see the difficulty don't you? How will the computer know in advance
> > that the regex matches only a finite set of possible strings?
>
> Well sure it might be a little difficult to figure _that_ out, although
> probably not all that hard if yo
[EMAIL PROTECTED] wrote:
> Hi all,
>
> Does anybody know of a module that allows you to enumerate all the
> strings a particular regular expression describes?
Make a generator that yields *all* strings in your chosen alphabet (see
the monthly threads about permutations and combinations for hints
Hi blair.bethwaite
> I want a tool that can enumerate a regex,
> with support for generating each string
> described by the regex in some predefined order.
If you run the regex against some target
string, this is gonna be easy (but maybe
not what you want).
If you have the string 'Python' and
[EMAIL PROTECTED] wrote:
> Hi all,
>
> Does anybody know of a module that allows you to enumerate all the
> strings a particular regular expression describes?
>
> Cheers,
> -Blair
>
By hand write down a generator that will solve the simplest case of '.*' as a
regexp, and filter the output of th
> Why are people getting stuck on infinite regular
> languages? I've made it quite clear that I'm only really
> interested in doing this for finite languages, but that
> shouldn't matter anyway.
The power of regular expressions is that they define a
consice means to encapsulate an infinite numb
> I thought that was the case, I've found a paper on the topic at least.
> Maybe once I've finished some other work I'll give it a shot. It seems
> like a fairly useful thing to be able to do with a regular expression
> so I just guessed that somebody must have done it already.
Just wandering: w
Dale Strickland-Clark wrote:
> Any regular expression that has an asterisk in it has an infinite number of
> possible matches.
>
> If it has two asterisks, that's an infinite number squared and that's a
> really big number.
>
> You wouldn't want to print them out.
We've been over this already. Wh
Any regular expression that has an asterisk in it has an infinite number of
possible matches.
If it has two asterisks, that's an infinite number squared and that's a
really big number.
You wouldn't want to print them out.
[EMAIL PROTECTED] wrote:
> Hi all,
>
> Does anybody know of a module th
Michael J. Fromberger wrote:
> > You see the difficulty don't you? How will the computer know in advance
> > that the regex matches only a finite set of possible strings?
>
> You don't. Hence, you want something that behaves like a generator, and
> will produce the strings one at a time. Preferab
In article <[EMAIL PROTECTED]>,
James Stroud <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > James Stroud wrote:
> >
> >>You mean like re.compile(r'.*') ?
> >
> >
> > No. I mean like:
> >
> regex = re.compile(r'a|b')
> regex.enumerate()
> >
> > a
> > b
>
> You see the dif
James Stroud wrote:
> You see the difficulty don't you? How will the computer know in advance
> that the regex matches only a finite set of possible strings?
Well sure it might be a little difficult to figure _that_ out, although
probably not all that hard if you converted to an FSA or something.
[EMAIL PROTECTED] wrote:
> James Stroud wrote:
>
>>You mean like re.compile(r'.*') ?
>
>
> No. I mean like:
>
regex = re.compile(r'a|b')
regex.enumerate()
>
> a
> b
>
>
You see the difficulty don't you? How will the computer know in advance
that the regex matches only a finite set
James Stroud wrote:
> You mean like re.compile(r'.*') ?
No. I mean like:
>>> regex = re.compile(r'a|b')
>>> regex.enumerate()
a
b
>>>
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Hi all,
>
> Does anybody know of a module that allows you to enumerate all the
> strings a particular regular expression describes?
>
> Cheers,
> -Blair
>
You mean like re.compile(r'.*') ?
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
L
Hi all,
Does anybody know of a module that allows you to enumerate all the
strings a particular regular expression describes?
Cheers,
-Blair
--
http://mail.python.org/mailman/listinfo/python-list
15 matches
Mail list logo