possible bug in re expression?

Robin Becker robin at reportlab.com
Fri Apr 25 12:30:45 EDT 2014


Whilst translating some javascript code I find that this

A=re.compile('.{1,+3}').findall(p)

doesn't give any error, but doesn't manage to find the strings in p that I want 
len(A)==>0, the correct translation should have been

A=re.compile('.{1,3}').findall(p)

which works fine.

should

re.compile('.{1,+3}')

raise an error? It doesn't on python 2.7 or 3.3.
-- 
Robin Becker




More information about the Python-list mailing list