Hey guys,
I am trying to sort some URL’s on my website and my list looks like this:
Is there a way i can sort / remove every link with duplicated domain? (I have more links but could only paste 2)
Hey guys,
I am trying to sort some URL’s on my website and my list looks like this:
Is there a way i can sort / remove every link with duplicated domain? (I have more links but could only paste 2)
There are functions to sort & permute lines.
command palette
with Ctrl + Shift + P
Sort Lines
Permute Lines: Unique
However, that solution requires that your entries are EXACT matches
( EG: https://ollygames.com
& http://ollygames.com
would each be seen as unique entries )
Also, in order for that to work, you would have to trim all subdomains via a RegEx
find/replace or something.
You could use something like (?<=\.(com|org|net)).*
as your find
query ( with RegEx
Enabled ) and leave the replace
field blank.
That’s the [ quickest | easiest ] way to go about it, assuming it matches the requirements of your source content & end results.
A more specific solution would be to write a plugin that compares RegEx
results within the selection & removes lines with more than one match.