<div dir="ltr"><a href="https://pypi.python.org/pypi/regex">https://pypi.python.org/pypi/regex</a><br><div><br></div><div>I believe there is an error in the example expression used in the docs.</div><div><br></div><div><i>"<span style="color:rgb(0,0,0);font-family:Arial,Verdana,Geneva,"Bitstream Vera Sans",Helvetica,sans-serif;font-size:14.6404px">In the regex </span><tt style="color:rgb(0,0,0)"><span class="gmail-pre" style="white-space:pre">(\s+)(?|(?P<foo>[A-Z]+)|(\w+)</span> <span class="gmail-pre" style="white-space:pre">(?P<foo>[0-9]+)</span></tt><span style="color:rgb(0,0,0);font-family:Arial,Verdana,Geneva,"Bitstream Vera Sans",Helvetica,sans-serif;font-size:14.6404px"> there are 2 groups:</span>"</i></div><div><br></div><div><br></div><div>The "<span style="color:rgb(0,0,0);font-family:monospace;white-space:pre">(?|</span>" has no closing ")" in the expression, I have not tested this but just seeing this and breaking it down across line breaks makes my brain immediately go to PCRE mindset and say this expression is broken.  Am I missing something? </div><div><br></div><div><tt style="color:rgb(0,0,0)"><span class="gmail-pre" style="white-space:pre">(\s+)</span></tt></div><div><tt style="color:rgb(0,0,0)"><span class="gmail-pre" style="white-space:pre">(?|</span></tt></div><div><tt style="color:rgb(0,0,0)"><span class="gmail-pre" style="white-space:pre">(?P<foo>[A-Z]+)</span></tt></div><div><tt style="color:rgb(0,0,0)"><span class="gmail-pre" style="white-space:pre">|</span></tt></div><div><tt style="color:rgb(0,0,0)"><span class="gmail-pre" style="white-space:pre">(\w+)</span></tt></div><div><tt style="color:rgb(0,0,0)"> <span class="gmail-pre" style="white-space:pre">(?P<foo>[0-9]+)</span></tt><span style="color:rgb(0,0,0);font-family:Arial,Verdana,Geneva,"Bitstream Vera Sans",Helvetica,sans-serif;font-size:14.6404px"> </span></div><div><span style="color:rgb(0,0,0);font-family:Arial,Verdana,Geneva,"Bitstream Vera Sans",Helvetica,sans-serif;font-size:14.6404px"><br></span></div><div><span style="color:rgb(0,0,0);font-family:Arial,Verdana,Geneva,"Bitstream Vera Sans",Helvetica,sans-serif;font-size:14.6404px">-Ant</span></div></div>