我有一个包含日志打印输出的文件,我想读取某些行,并从行中到行尾的某个点读取并移至符合条件的下一行。我想从 RULE EXECUTING 开始阅读到行尾,然后检查它的下一行是否有 RULE EXECUTING 如果不跳到下一行,如果确实有 RULE EXECUTING 然后从该点复制到行尾.
FILE SAMPLE
2013-02-14 09:26:20:078 [main] DEBUG sne.ABC.hdhdh.jfjjfj.jkfjfjd.jdsd - RULE EXECUTING --> CMNETSL.hdjjjdlskdnlskd.jgfkdflkdfl_Translation
2013-02-14 09:28:00:312 [main] DEBUG moc.uty.lweifoisd.sfsd.kjfdnkjs.RulesetInvoker - Rudejgfjkgjf: After invoking: CMNETSLO
2013-02-14 09:26:20:421 [main] DEBUG sne.ABC.hdhdh.jfjjfj.jkfjfjd.jdsd - RULE EXECUTING --> sne.ABC.hdhdh.jfjjfj.jkfjfjd.jdsd
what I want to get from the line would look like this
RULE EXECUTING --> CMNETSL.hdjjjdlskdnlskd.jgfkdflkdfl_Translation
RULE EXECUTING --> sne.ABC.hdhdh.jfjjfj.jkfjfjd.jdsd