This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: regex 0.1.20110514 findall overlapped not working with 'start of string' expression
Type: Stage: resolved
Components: Regular Expressions Versions: Python 2.7
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: brian.curtin, ezio.melotti, jcerruti, mrabarnett
Priority: normal Keywords:

Created on 2011-05-20 22:47 by jcerruti, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (6)
msg136405 - (view) Author: Julian (jcerruti) Date: 2011-05-20 22:47
Trying to use regex 0.1.2011051 with the overlapped=True feature

It works great, unless I have the 'start of string' (caret) character in my regular expression:


>>> regex.findall(r"a.*b","abadalaba",overlapped=True)
['abadalab', 'adalab', 'alab', 'ab']
>>> regex.findall(r"^a.*b","abadalaba",overlapped=True)
['abadalab']
msg136406 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2011-05-20 22:49
Please report this to the regex bug tracker.
msg136407 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2011-05-20 22:51
I think that's normal, the ^ matches only at the beginning of the string.
msg136408 - (view) Author: Julian (jcerruti) Date: 2011-05-20 22:53
Sorry for posting in the wrong tracker. I'm a bit dumb: can you please point me to the right tracker?

I know ^ should match the beginning of the string, but there are multiple overlapping matches with the beginning of the string (as the first set of results show). Maybe I'm missing something subtler here?
msg136409 - (view) Author: Julian (jcerruti) Date: 2011-05-20 23:03
Just in case somebody else stumbles upon this, I ended up posting here: https://code.google.com/p/mrab-regex-hg/issues/detail?id=10
msg136415 - (view) Author: Matthew Barnett (mrabarnett) * (Python triager) Date: 2011-05-21 00:22
Replied to the regex bug tracker.
History
Date User Action Args
2022-04-11 14:57:17adminsetgithub: 56339
2011-05-21 00:22:54mrabarnettsetmessages: + msg136415
2011-05-20 23:03:06jcerrutisetmessages: + msg136409
2011-05-20 22:53:04jcerrutisetmessages: + msg136408
2011-05-20 22:51:21ezio.melottisetnosy: + ezio.melotti, mrabarnett
messages: + msg136407
2011-05-20 22:49:05brian.curtinsetstatus: open -> closed

nosy: + brian.curtin
messages: + msg136406

resolution: rejected
stage: resolved
2011-05-20 22:47:51jcerruticreate