Mark every line contains less than 3 dots
-
i have a list of ip, but i want to mark every line which contains less than 3 dots(.)
example:
220.108.104.67
220.132.126
220.135.237.66
220.135.254.94
220.181.7
220.181.19.65
220.181.19.87result:
i want the line 2 and 5 to be marked(220.181.7 and 220.132.126) -
Hello, @mohammed-asif and All,
Very easy with regexes !
-
Open the Mark dialog (
Ctrl + M) -
SEARCH
^\d{1,3}\.\d{1,3}\.\d{1,3}$ -
Tick the
Bookmark lineoption and, preferably, theWrap aroundoption -
Select the
Regular expressionsearch mode -
Hit the
Mark Allbutton
Voila !
An alternate syntax, using a subroutine call to group
1, would be :SEARCH
^(\d{1,3})(\.(?1)){2}$Best Regards,
guy038
-
-
The easy way is to mark all lines with three dots then to invert the bookmarks.
Open the mark dialogue, ensure “Regular expressions” and “Bookmark line” are selected and that “Dot matches newline is not selected”. Enter the regular expression
\..*\..*\.then click “Mark all”.
The final step is to use menu => Search => Bookmark => Inverse bookmark. -
thanks, guys it worked, both of your solutions worked
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login