mbstevens wrote:
> In such a case you may need to make the page
> into one string to search if you don't want to use some complex
> method of tracking state with variables as you move from
> string to string.
In general it's a very hard problem to do stateful regexes.
I recall something from las
"mbstevens" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Thu, 06 Jul 2006 08:32:46 +0100, Martin Evans wrote:
>
>> "Juho Schultz" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>>> Martin Evans wrote:
Sorry, yet another REGEX question. I've been struggling
On Thu, 06 Jul 2006 08:32:46 +0100, Martin Evans wrote:
> "Juho Schultz" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Martin Evans wrote:
>>> Sorry, yet another REGEX question. I've been struggling with trying to
>>> get
>>> a regular expression to do the following example i
>>> import SE
>>> Editor = SE.SE ('sleeping=dead sleeping.htm== sleeping<==')
>>> Editor ('This parrot is
sleeping. Really, it is sleeping.'
'This parrot is sleeping. Really, it
is dead.'
Or:
>>> Editor ( (name of htm file), (name of output file) )
Usage: You make an explicit list of what you want
"Juho Schultz" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Martin Evans wrote:
>> Sorry, yet another REGEX question. I've been struggling with trying to
>> get
>> a regular expression to do the following example in Python:
>>
>> Search and replace all instances of "sleeping" wi
Martin Evans wrote:
> Sorry, yet another REGEX question. I've been struggling with trying to get
> a regular expression to do the following example in Python:
>
> Search and replace all instances of "sleeping" with "dead".
>
> This parrot is sleeping. Really, it is sleeping.
> to
> This parrot is