Matthew Barnett <pyt...@mrabarnett.plus.com> added the comment:

A smaller change to the regex would be to replace the "(?:.*,)*" with 
"(?:[^,]*,)*".

I'd also suggest using a raw string instead:

rx = re.compile(r'''(?:[^,]*,)*[ \t]*([^ \t]+)[ \t]+realm=(["']?)([^"']*)\2''', 
re.I)

----------
nosy: +mrabarnett

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38826>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to