假设我有一个文本文件,其内容类似于以下内容:021 Line one of section A.021 Line two of Section A.021 Line three of section A.021 Part two of Line three of Section A.021 We just skipped line four, but that's okay.021 Back to line six.Non-formatted lines to be ignored. This can be from 0 lines, to any number of lines, and the content can be any text.033 Line 1 of Section B033 Line 2 of Section B033 Okay, that's enough.是否可以在正则表达式中给我两组,第一组包含所有以开头的行021,第二组包含所有以开头的行033?行标记会有所不同,但始终是\d{3}.
添加回答
举报
0/150
提交
取消