Message280790
Given:
pattern = r"(^|[^\\])<(pm [^ ]+( +|'[^']*'|\"[^\"]*\"|[^>]+)+)>"
s = "<b>Bain, F. W.</b> <pm href 'Digit of the moon, and other"
import re
m = re.search(pattern, s)
The re.search call seems to loop, never returning (or, at least never returning as long as I was willing to wait).
Note that with a ">" added to the end of s, it returns quickly with a match. Without the ">" it should fail, but instead seems to loop.
(If I use the regex module instead of re, it fails properly and quickly.)
Python 3.5.1, Windows 10:
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32 |
|
Date |
User |
Action |
Args |
2016-11-14 16:24:47 | Walter Farrell | set | recipients:
+ Walter Farrell, ezio.melotti, mrabarnett |
2016-11-14 16:24:47 | Walter Farrell | set | messageid: <1479140687.65.0.411208896351.issue28690@psf.upfronthosting.co.za> |
2016-11-14 16:24:47 | Walter Farrell | link | issue28690 messages |
2016-11-14 16:24:47 | Walter Farrell | create | |
|