regex - How to find all lines with character occuring more than x times, Notepad++? -


i have of consider trivially easy problem solve.

i have list formatted so;

?d?d?d?d?l?d?d?d ?d?d?d?d?l?d?d?l ?d?d?d?d?l?d?d?u ?d?d?d?d?l?d?l?d ?d?d?d?d?l?d?l?l 

there many tens of thousands of lines this. regular expression select of lines contain more 5 occurrences of letter d can removed list.

despite searching extensively, have not found solution works. i've found many ways of searching occurrences of characters etc. on , other forums (including spaces , special characters), , have been able conduct search on other lists of words think presence of question marks screws up... can't sure though.

i apologise in advance if somehow missed post explains perfectly, have made effort find solution on own , have become exasperated it.

many in advance provided!

use find , replace , replace lines matching following nothing:

^.*(d.*){6}.*\r\n 

explanation:

^ - start @ beginning of line .* - skip 0 or more uninteresting characters not past end of line (d.) - find d followed uninteresting characters not past end of line {6} - repeat last group 6 times (so 6 d followed anything) . - match remaining characters end of line \r\n - match end of line sequence (as pointed out @toto, better \r

see https://regex101.com/r/uayaz4/1


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -