Re: Python backreference replacing doesn't work as expected

2015-07-12 Thread MRAB
On 2015-07-12 10:40, Yonggang Chen wrote: There are two named groups in my pattern: myFlag and id, I want to add one more myFlag immediately before group id. Here is my current code: ## code begin # i'm using Python 3.4.2 import re import os contents = b''' xdlg::xdlg(x_app* pApp, CWnd* pParent

Python backreference replacing doesn't work as expected

2015-07-12 Thread Yonggang Chen
There are two named groups in my pattern: myFlag and id, I want to add one more myFlag immediately before group id. Here is my current code: ## code begin # i'm using Python 3.4.2 import re import os contents = b''' xdlg::xdlg(x_app* pApp, CWnd* pParent) : customized_dlg((UINT)0, pParent, pAp