On Thu, 29 Apr 2010 06:36:18 am Lie Ryan wrote:
> On 04/29/10 01:32, m...@doctors.net.uk wrote:
> > While some patterns are infinite, other's aren't (e.g. The example
> > I gave).
>
> How should the regex engine know about that?
The regex engine itself doesn't run in reverse, so it can't know this
On Wed, Apr 28, 2010 at 2:27 AM, wrote:
> Is there an way of using the regex patterns to produce text, instead of
> matching it?
There have been some previous discussions about generating all of the
possible matches for a given regular expressions. I believe these are
the first messages in a c
On 04/29/10 01:32, m...@doctors.net.uk wrote:
> While some patterns are infinite, other's aren't (e.g. The example I gave).
How should the regex engine know about that?
> Using a subset of Regex syntax to produce a set of strings has the
> advantage of using a well understood and documented for
pattern(p1))
I suspect it's not that easy, as I don't think we can get to the internals of
the regex FSM. However, I thought it would be worth asking.
Matt
Etc.
--Original Message--
From: Luke Paireepinart
To: m...@doctors.net.uk
Cc: Python tutor
Subject: Re: [Tutor] Using Regex
On Wed, Apr 28, 2010 at 1:27 AM, 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
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()
Thanks,
Matt
Sent from my BlackBerry® wireless device
___
Tutor maillist -