Keep only specific links
-
Hi.
How can I keep links like this:
https://archiveofourown.org/works/120628
and not links like these:
https://archiveofourown.org/works/120628#comments
https://archiveofourown.org/works/120628/bookmarks
https://archiveofourown.org/works/120628?show_comments=true#commentsThanks so much
-
What you want is a little loosely defined. For example, this will do it, but I sense you want something more generic over the whole expression:
Find what zone:
(?-s)https://archiveofourown\.org/works/120628(?=[#/?]).+\R
Replace with zone: make sure this is EMPTY
Search mode: Regular expressionIt also assumes that the lines end where shown above by the OP, but this is somewhat of an arbitrary assumption…
Hmmm…don’t know that this actually deserves a down-vote…whomever did that…
-
Another option was to mark lines that had only links like this:
https://archiveofourown.org/works/14272356
The numbers in bold are different every time.
-
Again, what you are trying to achieve is vague. You’re not going to get the best help that way (and you may even get down-voted again).
So…first you wanted to delete text, now you want to mark text…which is it?
You can match a number that is different every time by using
\d+
in the expression where the number occurs.