On Apr 3, 4:50 am, Alex9968 <[EMAIL PROTECTED]> wrote:
> Can I get sequence of all strings that can match a given regular
> expression? For example, for expression '(a|b)|(x|y)' it would be ['ax',
> 'ay', 'bx', 'by']
>
Actually, this regex will only match 'a', 'b', 'x', or 'y' (assuming
you meant
En Thu, 03 Apr 2008 06:50:52 -0300, Alex9968 <[EMAIL PROTECTED]>
escribió:
> Can I get sequence of all strings that can match a given regular
> expression? For example, for expression '(a|b)|(x|y)' it would be ['ax',
> 'ay', 'bx', 'by']
See this thread:
http://groups.google.com/group/comp.lang.
Alex9968 <[EMAIL PROTECTED]> wrote:
> Can I get sequence of all strings that can match a given regular
> expression? For example, for expression '(a|b)|(x|y)' it would be ['ax',
> 'ay', 'bx', 'by']
>
> It would be useful for example to pass these strings to a search engine
> not supporting RegE
I don't think there is any built in way. Regular expressions are
compiled into an expanded pattern internally, but I don't think that
it is anything that would be useful for you to directly access.
If you are interested in a lot of work, you could do something with
PLY and write an re parser that
Can I get sequence of all strings that can match a given regular
expression? For example, for expression '(a|b)|(x|y)' it would be ['ax',
'ay', 'bx', 'by']
It would be useful for example to pass these strings to a search engine
not supporting RegExp (therefore adding such support to it). A prog