<div dir="ltr">My question for you: how on earth did you find this?! Speaking of a needle in a haystack. Did you run some kind of analysis program that looks for regexprs? (We've received some good reports from someone who did that looking for possible DoS attacks.)<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 1, 2018 at 6:49 PM, MRAB <span dir="ltr"><<a href="mailto:python@mrabarnett.plus.com" target="_blank">python@mrabarnett.plus.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">A thread on python-ideas is talking about the prefixes of string literals, and the regex used in IDLE.<br>
<br>
Line 25 of Lib\idlelib\colorizer.py is:<br>
<br>
stringprefix = r"(?i:\br|u|f|fr|rf|b|br|rb)?"<br>
<br>
which looks slightly wrong to me.<br>
<br>
The \b will apply only to the first choice.<br>
<br>
Shouldn't it be more like:<br>
<br>
stringprefix = r"(?:\b(?i:r|u|f|fr|rf|b|br|rb<wbr>))?"<br>
<br>
?<br>
______________________________<wbr>_________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/guido%40python.org" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/options/python-dev/guido%<wbr>40python.org</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div>