问题描述
我有以下模式(与re.DOTALL
一起使用)和文本
(?P<year>20\d{2}).*?(?P<currency>RMB\d{1,3}(\W\d{3})*)
The financial statements for 2019 prepared in accordance with Accounting Standards for Business Enterprises by
the Group were audited by Grant Thornton (Special General Partnership). The Company paid the auditor in aggregate
RMB2,500,000 and RMB800,000 in respect of financial statements audit and non-audit services in relation to internal
control for 2018 respectively. The financial statements for 2019 prepared in accordance with Accounting Standards for Business Enterprises by
the Group were audited by Grant Thornton (Special General Partnership). The Company paid the auditor in aggregate
RMB2,000 in respect of financial statements audit and non-audit services in relation to internal
control for 2019 respectively.
它给出以下结果。
Match 1
Named groups
currency RMB2,000
year 2019
All groups
1. 2019
2. RMB2,000
3.,000
Match 2
Named groups
currency RMB2,000
year 2018
All groups
1. 2018
2. RMB2,000
但是我想拥有当年的所有货币金额,预期结果如下
Match 1
Named groups
currency RMB2,000
currency RMB800,000
4. RMB800,000
5.,000
我该怎么做? 这是正则表达式的link
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)