regex - How can I combine matching rules in vim into one? -


I have a log file containing my debug, normal and serious entries as well as some information that is regular Type) for data eg [code] [20130313: 123412]

  [210313: 100114] General: This is the normal log [210313: 100114] DEBUG: ../ ./common/ Additional information   

I would also like to remove both debugs entries, as well as those who did not start with [ Do it]

I know that I It may do so would:

 : g / debug / d   

and

 : g! / ^ \ [/ D   

How can I add it to one? Or use a regex properly?

Change them both as positive or negative rules (as appropriate), and then you Or to match the other \ | ("or").

 : g / ^ [^ \ [] \ | DEBUG / d   

It has to be done with ^ [^ \ <] [, or debug For lines starting with lines

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -