[issue35146] Bad Regular Expression Broke re.findall()

2018-11-02 Thread Dan Boxall
Dan Boxall added the comment: Yes I realised that, as I said earlier. But it could say, "Invalid regular expression" and not produce ten lines of error messages. On Fri, 2 Nov 2018 at 14:21, Steven D'Aprano wrote: > > Steven D'Aprano added the comment: > > This is not a bug in Python, it i

[issue35146] Bad Regular Expression Broke re.findall()

2018-11-02 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is not a bug in Python, it is an invalid (broken) regular expression. There is nothing that the interpreter or the regular expression engine can do, because you are telling it to do something that makes no sense. What do you expect findall to find, if

[issue35146] Bad Regular Expression Broke re.findall()

2018-11-02 Thread Dan Boxall
Dan Boxall added the comment: Thank you. I realised that and if I put a dot in front it worked fine. But it should not break the function, so they will surely want to fix the bug? Kind regards, Dan Boxall On Fri, 2 Nov 2018 at 13:56, Windson Yang wrote: > > Windson Yang added the comment:

[issue35146] Bad Regular Expression Broke re.findall()

2018-11-02 Thread Windson Yang
Windson Yang added the comment: The last line "re.error: nothing to repeat at position 0" shows that you should not put raw * as the first element, use \* instead. -- nosy: +Windson Yang ___ Python tracker

[issue35146] Bad Regular Expression Broke re.findall()

2018-11-02 Thread Dan Boxall
New submission from Dan Boxall : Hi, I'm new to regular expressions and while playing around with them I tried this: >>> rex = '*New Revision:.* ([0-9]+)' >>> re.findall(rex, text) and got this: Traceback (most recent call last): File "", line 1, in File "C:\Python\Python37\lib\re.py",