Home Ask Login Register

Developers Planet

Your answer is one click away!

George February 2016

Regex for Notepad++

I have a log for an app that executes every minute or so and at the end it reports number of records it failed with like this: TaskBlahBlah: [0] records failed

Up until now I would simply search through the whole document for ] records failed string and would visually identify the lines with greater then zero records. Is there a way to use regex and search for any non zero value specifically so I don't have to visually go through the list and potentially miss something?

I tried applying some regex to Notepad++ but it seems that either I did it wrong or Noteppad++ has a 'different' regex or something.

thank you

EDIT: just to list some of the things I tried:


\[[1-9][0-9]\] records failed|\[[1-9]\] records failed

For some reason it picks up things like [1] records failed but not [10] records failed


Svperstar February 2016

I guess this should get what you want:

/\[[1-9]\d*\] records failed/

Post Status

Asked in February 2016
Viewed 2,831 times
Voted 8
Answered 1 times


Leave an answer

Quote of the day: live life