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!
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+|$)
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments