Re: Get all strings matching given RegExp

2008-04-03 Thread Paul McGuire
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

Re: Get all strings matching given RegExp

2008-04-03 Thread Gabriel Genellina
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.

Re: Get all strings matching given RegExp

2008-04-03 Thread Marc Christiansen
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

Re: Get all strings matching given RegExp

2008-04-03 Thread Jeff
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

Get all strings matching given RegExp

2008-04-03 Thread Alex9968
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