Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Searching all lines between tags

    General Discussion
    2
    2
    121
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • pppps_0202
      pppps_0202 last edited by

      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?

      Terry R 1 Reply Last reply Reply Quote 0
      • Terry R
        Terry R @pppps_0202 last edited by

        @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

        1 Reply Last reply Reply Quote 1
        • First post
          Last post
        Copyright © 2014 NodeBB Forums | Contributors