Remove the lines that have characters less than 8 after the : using Notepad++

Mario

I have like that

abc2:12345678

ab50:1234567

clo:123456789

In the previous example, the second line should be removed because the characters after the : are less than 8 characters.

I tried a lot to get the regex but with no luck.

Any help would be appreciated.

Thanks!

revo

A simple way to match lines with maximum 7 characters after colon would be:

^[^:\n\r]*:.{0,7}$

If they are supposed to be digits:

^[^:\r\n]*:\d{0,7}$

You may also want to remove following newlines:

^[^:\r\n]*:\d{0,7}(?:\R+|$)

Live demo

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Remove lines that is shorter than 5 characters before the @ using Notepad++

Conditionally remove lines with less than 4 characters

Remove lines with less than 4 characters and more than 3 numbers in bash

Python - Remove line with less than "x" number of characters while preserving blank lines

How do I remove all lines in a file that are less than 6 characters?

Exclude lines that have less than 23 columns

Remove text files with less than three lines

Remove suffixes from words in a string that are only less than 8 characters long

How To Remove All Lines Containing Any non-ASCII Characters Using Notepad++ or Emeditor

Notepad ++ How to remove all characters after a string

how to add values to csv file using TCL and add space if the number of characters in a value is less than 8

move all files in a directory that have less than X lines

How to remove lines with length less than 3 words?

perl line to remove lines with a value less than x

Notepad++ Remove line have string length than 10 character

PHP Regex: Remove words less than 3 characters

how to remove words less than 3 characters from the columns

Pandas remove cell content if has less than specific number of characters

Remove Words Less Than 4 Characters from Pandas Series

How can I remove words with less than 3 characters?

SQL to update rows to remove words with less than N characters

Regex remove all lines after specific line notepad++

How to remove from a list the strings that have less than N tokens?

Remove rows which have less than string into a specific column

How to remove words that have less than three letters in PySpark?

Code to print all the lines that have more than 5 characters

How to remove all the lines of text before a specific text and all those after another specific text in multiple files using notepad++ or TextCrawler?

VB.Net - Remove lines longer than 5 characters

How to remove lines if they appear more than once in Notepad++? (removing both lines!)