[issue14510] Regular Expression + perform wrong repeat
YunJian tld...@yahoo.com.cn added the comment: Well, maybe I had never understood this though I use RE oftenly, this is the first time I met this and in my mind capture should not perform like this, thank you very much! 发件人: Matthew Barnett rep...@bugs.python.org 收件人: tld...@yahoo.com.cn 发送日期: 2012年4月6日, 星期五, 上午 12:08 主题: [issue14510] Regular Expression + perform wrong repeat Matthew Barnett pyt...@mrabarnett.plus.com added the comment: If a capture group is repeated, as in r'(\$.)+', only its last match is returned. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14510 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14510 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14510] Regular Expression + perform wrong repeat
YunJian tld...@yahoo.com.cn added the comment: If that was caused by capture, I think I should learn and use it from start because it gave a result I didn't want but in the way I want, thank you very much, I will be more careful next time, thank you! 发件人: Ezio Melotti rep...@bugs.python.org 收件人: tld...@yahoo.com.cn 发送日期: 2012年4月6日, 星期五, 上午 9:41 主题: [issue14510] Regular Expression + perform wrong repeat Ezio Melotti ezio.melo...@gmail.com added the comment: ['$b$B', '$B$b'] -- assignee: - ezio.melotti resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14510 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14510 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14510] Regular Expression + perform wrong repeat
New submission from YunJian tld...@yahoo.com.cn: Regular expression perform wrong result, I use regular expression r'(\$.)+' try to match $B$b or something like that, but the script only give back $b, r'(\$.){1,}', r'(\$.){2}' performed the same, you can take the file I attached for reference and run it, I try to solve it myself but failed, now I must use other ways to realize my aim, so appreciate for you help, thank you! -- components: Regular Expressions files: CheckInconsistency.py messages: 157588 nosy: ezio.melotti, mrabarnett, tld5yj priority: normal severity: normal status: open title: Regular Expression + perform wrong repeat type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file25136/CheckInconsistency.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14510 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com