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
between
I 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