0 votes

I have a file that has pairs of Start/End times. In some instances there are two "END" lines in a row, so basically I want to find the two lines with the same word in each line (++END++)

I've tried Multiline RegEx but I can't seem to find the right combination to make this work.. HELP!

10/22/2018 2:20:27 Pay_Item_Button ++SRT++..... TS-14:20:27.8984
10/22/2018 2:20:28 Display Item End ++END++..... TS-14:20:28.7876
10/22/2018 2:21:18 Pay_Item_Button ++SRT++..... TS-14:21:18.7548
10/22/2018 2:21:19 Display Item End ++END++..... TS-14:21:19.9560
10/22/2018 2:21:22 Pay_Item_Button ++SRT++..... TS-14:21:22.1868
10/22/2018 2:21:23 Display Item End ++END++..... TS-14:21:23.8560
10/22/2018 3:01:24 Display Item End ++END++..... TS-15:01:24.1030

10/22/2018 3:04:42 PayCmp_Button ++SRT++.... TS-15:04:42.0370
10/22/2018 3:04:43 Display Item End ++END++..... TS-15:04:43.3475

asked by (40 points)

1 Answer

+1 vote

You're right to use the multi-line regex option. Try this expression

\+\+END\+\+[^\n]*\n[^\n]*\+\+END\+\+

Important bits:

\+       The '+' needs to be escaped
[^\n]*   Match everything except an End of Line (EOL) char
\n       Match the EOL
answered by (62k points)
Yes sir that works.. outstanding, thank you!
...