Searching all lines between tags
-
I would like to copy all the lines between <a href… </a> from a old html file, is there a smarter way using the search tool?
-
@tss-tss said in Searching all lines between tags:
I would like to copy all the lines between <a href… </a> from a old html file, is there a smarter way using the search tool?
When you say copy
betweenI would presume the line would also contain the <a href… and </a> code as well. that is unless the lines are formatted in such a way as to have this code on lines by themselves and the lines you want are indeed ‘between’.So using the Mark function (Search, Mark, Ctrl+M default shortcut) you would add the following to the find field:
Find What:(?s)<a href>.+?</a>
Tick the box “bookmark line”, search mode is regular expression. Click on “Mark All”. You will now see lines that you want to copy are preceded by a blue circle/sphere. These are the bookmarks. Then Right click on this area and select “Copy Bookmarked Lines”. Create a new tab and insert those lines using Ctrl-V (paste).If you need a definition of the regular expression please just ask.
Terry
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