homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steve.newcomb
Recipients ezio.melotti, mrabarnett, steve.newcomb
Date 2012年09月17日.13:33:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1347888827.23.0.363134887653.issue15956@psf.upfronthosting.co.za>
In-reply-to
Content
The '\\g<startquote>' in the below does not work:
>>> repr( re.compile( '\\<\\!ENTITY[ \011円\012円\015円]+\\%[ \011円\012円\015円]*(?P<entityName>[A-Za-z][A-Za-z0-9\\.\\-\\_\\:]*)[ \011円\012円\015円]*(?P<startquote>[\042円\047円])(?P<entityText>.+?)\\g<startquote>[ \011円\012円\015円]*\\>', re.IGNORECASE | re.DOTALL).search( '<!ENTITY % m.mixedContent "( #PCDATA | i | b)">'))
'None'
In the following, the '\\g<startquote>' has been replaced by '\2円'. It works.
>>> repr( re.compile( '\\<\\!ENTITY[ \011円\012円\015円]+\\%[ \011円\012円\015円]*(?P<entityName>[A-Za-z][A-Za-z0-9\\.\\-\\_\\:]*)[ \011円\012円\015円]*(?P<startquote>[\042円\047円])(?P<entityText>.+?)\2円[ \011円\012円\015円]*\\>', re.IGNORECASE | re.DOTALL).search( '<!ENTITY % m.mixedContent "( #PCDATA | i | b)">'))
'<_sre.SRE_Match object at 0x7f77503d1918>'
Either this feature is broken or the re module documentation is somehow misleading me.
(Yes, I know there is an XML error in the above. That's because it's SGML.)
History
Date User Action Args
2012年09月17日 13:33:47steve.newcombsetrecipients: + steve.newcomb, ezio.melotti, mrabarnett
2012年09月17日 13:33:47steve.newcombsetmessageid: <1347888827.23.0.363134887653.issue15956@psf.upfronthosting.co.za>
2012年09月17日 13:33:23steve.newcomblinkissue15956 messages
2012年09月17日 13:33:22steve.newcombcreate

AltStyle によって変換されたページ (->オリジナル) /