I've got a list of links on notepad++, each line is a link.

for example:




How to only bookmark url's without a host name or sub-domain?

Meaning how to only bookmark url's like this: http://mcafee.org/root/Support.aspx?

Tried TONS of stuff and I could not figure this out... Any help would be greatly appreciated.

  • "mark" them how? Exactly what "tons of stuff" did you try already, and what were the results (to avoid us offering something you've already tried)? – Ƭᴇcʜιᴇ007 Sep 1 '16 at 18:08
  • marking them using shift+F, at the mark tab, tried replacing the dots of the links with a different character like "=" used and searched for this: http://.*?.*?=.*?.*?=.*?.*?/ with regular expression. at first it seems to work, but it also selects the links that I'm trying to mark. also tried doing this: superuser.com/questions/554387/… but I can't seems to get it to find anything. – Alon Shuster Sep 1 '16 at 18:13
  • Ahh gotcha on the marking. "Top-level" actually refers to the ".com" part. You want urls with only a (single) domain name + top-level; not ones with a host name, or sub-domain(s) -- which is tricky for sure. I updated your question to reflect that; if you disagree with my changes, feel free to roll them back. :) – Ƭᴇcʜιᴇ007 Sep 1 '16 at 18:28
  • Thanks for the edit and corrections, didn't manage to make the post look tidy with the site's post editor. anyway hope someone could find an answer to this. – Alon Shuster Sep 1 '16 at 18:40
  • I tried a few things, but it stumped me for now. Hopefully someone better at RegEx will come along and be able to figure out how to pull this off for ya. :) – Ƭᴇcʜιᴇ007 Sep 1 '16 at 18:42

You can use the following regex.


Here is the GIF that shows how it works. Hope it helps.

(Note: I did not have many test cases (3), so you may have to build on it)

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.