Author LHampton
Recipients LHampton, docs@python
Date 2020-03-22.17:44:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1584899079.21.0.403850143741.issue40043@roundup.psfhosted.org>
In-reply-to
Content
Hello,
In the 3.7.7 documentation on Regular Expression, the Conditional Construct, (?(id/name)yes-pattern|no-pattern), is discussed. (This is a very thorough document, by the way. Good job!)
One example given for the Conditional Construct does not work as described. Specifically, the example gives this matching pattern '(<)?(\w+@\w+(?:\.\w+)+)(?(1)>|$)' and states that it will NOT MATCH the string '<user@host.com'. In my tests the pattern DOES MATCH that string.
(The other examples work as described.) 
This may be a bug in re since it seems to me that the match should fail.
Respectfully,
Leon
History
Date User Action Args
2020-03-22 17:44:39LHamptonsetrecipients: + LHampton, docs@python
2020-03-22 17:44:39LHamptonsetmessageid: <1584899079.21.0.403850143741.issue40043@roundup.psfhosted.org>
2020-03-22 17:44:39LHamptonlinkissue40043 messages
2020-03-22 17:44:39LHamptoncreate