On Wed, Apr 28, 2010 at 1:27 AM, <m...@doctors.net.uk> wrote: > Dear All, > > Quick question: > > Is there an way of using the regex patterns to produce text, instead of > matching it? > > E.g.: > pat = re.compile("ab?d") > pat.getListofPossibleText() >
There's no end to the length of many patterns so this would be fairly pointless. For example, what would getListofPossibleText do for the pattern ".*" ? I think the better question is: what are you trying to do? Or perhaps: Why do you think you need to solve your problem this way? -Luke _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor