[Zope-dev] random regex

2001-09-26 Thread seb bacon

I'm finding that the regex which deals with links in structured text
is broken (Zope 2.4.1, Python 2.1).  If you try a link with a query
string:
 
 link:http://www.foo.com?ding=dongbit=bat

the part of the regex which is matching the url only matches up to the
first '=' (or '').

If I run the expression against a string in the python interpreter,
the correct match is returned.  The problem only occurs in
lib/python/StructuredText/DocumentClass.py.  After a lot of playing
around with the expression, I found I could only get it to match
correctly *by running it against the same string three times in a
row*. 

Can anyone else reproduce this problem?  Has anyone any suggestions as
to what might be causing it?  Perhaps it's some kind of boundary
condition in the re module?  I don't really have the time to pursue it
much further, so it looks like I'll have to settle with a Tracker
entry and a nasty hack.

seb


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] random regex

2001-09-26 Thread Andreas Jung


- Original Message - 
From: seb bacon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 26, 2001 10:47
Subject: [Zope-dev] random regex


 I'm finding that the regex which deals with links in structured text
 is broken (Zope 2.4.1, Python 2.1).  If you try a link with a query
 string:
  
  link:http://www.foo.com?ding=dongbit=bat
 
 the part of the regex which is matching the url only matches up to the
 first '=' (or '').

This works for me with the latest checkout of the Zope-2_4-branch. Please
check if the problem persist.

Andreas


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )