csv - Notepad++ regex to find lines with more than n pipe-characters -


once again have problem regex in notepad++, since don't know lot it.
have .csv file, need find lines n (let's 4) or more pipe-characters.
example of string have:

6454345|user1-2ds3|62562012032|9c1fe63ccd3ab234892beaf71f022be2e06b6cd1 3305611|user2-42g563dgsdbf|22023001345|c36dedfa12634e33ca8bc0ef4703c92b73d9c433 8749412|user3-9|xgs|f|98906504456|411b0fdf54fe29745897288c6ad699f7be30f389 5151540|user4-jy|n|12202310|6a54c608289f4aedfab63ca640bcd5d174fd8592 

i need find these strings, have 4 or more pipe-characters:

8749412|user3-9|xgs|f|98906504456|411b0fdf54fe29745897288c6ad699f7be30f389  5151540|user4-jy|n|12202310|6a54c608289f4aedfab63ca640bcd5d174fd8592  

i did searches here couldn't find looking for, far used answers provided in these questions, besides didn't find similar:
find lines n occurrences of char
regular expression match text contains n or more of specified character
replaced requested characters in pipe-character, didn't work me.

you may use either of 2 expressions below match line have 4 pipes:

^(.*?\|){4} 

or

^([^|\r\n]*\|){4} 

note need have . matches newline option off make first pattern work.

pattern details:

  • ^ - start of line
  • (.*?\|){4} - 4 occurrences of chars other line break chars, few possible, first | , | char
  • [^|\r\n] - matches char |, cr , lf symbols.

enter image description here


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -