Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #70602

possible bug in re expression?

From Robin Becker <robin@reportlab.com>
Subject possible bug in re expression?
Date 2014-04-25 17:30 +0100
Newsgroups comp.lang.python
Message-ID <mailman.9498.1398443459.18130.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

possible bug in re expression? Robin Becker <robin@reportlab.com> - 2014-04-25 17:30 +0100

csiph-web