How to delete this on notepad?
I want to delete every line containing more then 3 dats on email, how to do it?
So this 2 are good
Alan Kilborn last edited by
Seems like this would match the lines you don’t want. If you can match them you can delete them by replacing with nothing.
Use regular expression search mode.
Alan Kilborn last edited by Alan Kilborn
Actually, you said:
delete every line containing more then 3 dats
But I gave a solution (above) for “3 or more” dots.
Here’s the semi-obvious slight adjustment to do “more than 3”:
PeterJones last edited by PeterJones
Alan’s second answer should give the results you requested.
But remember, “be careful what you ask for”: Specifically in this case, be wary of trying to differentiate between spam email and valid email addresses based on number of dots.
firstname.lastname@example.org valid; there are a lot of “peter jones”-es on gmail, and many of us use middle initials and/or some other modifier after the last name, breaking your “delete if more than three dots” rule
email@example.com valid: many colleges give alumni addresses on a subdomain
Anyone who is trying to solve spam by using regex will fail – both by not keeping out enough and by rejecting valid addresses. So if that’s what you’re doing, you might want to go a different direction.,
edit: my examples weren’t right, because re-reading the original post, it looks like you only want to match usernames (before the @ sign) that have more than 3 dots… which is different than I interpreted it (more than three dots anywhere in the email address, before or after the @). I am still leaving the post without deleting it because of conversational context, and because the general warning of my post – don’t expect regex to be able to filter out ‘fake’ email addresses – is still valid.
PeterJones last edited by
First, @Alan-Kilborn was the one who gave you the expression, not I. He deserves credit.
And I say credit, not blame, because his expression works on the address you just shared.
firstname.lastname@example.org:444 t.wo…email@example.com:333 firstname.lastname@example.org:222 email@example.com:111 b.et.2012.bs.@gmail.com:111
If your expression is not matching that last address, then you have not correctly used Alan’s expression.
Thank u Alan for help and your time :)