Community
    • Login

    Need Help For Remove a href Tag With out remove anchor Text

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 512 Views
    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.
    • S
      Smart Warriors
      last edited by

      <a href=“site.com”>hello</a>

      Need Only "Hello"Text From Above HTML CODE How to do Using Regular Experssion

      1 Reply Last reply Reply Quote 0
      • guy038G
        guy038
        last edited by guy038

        Hello, @smart-warriors and All,

        If we assume that the strings <a href= and </a> are, both, on one line, only, I suppose that the following regex does the job :

        • Open the Mark dialog ( Ctrl + M )

        • SEARCH (?s)<a href=.+?>\K.+?(?=</a>)

        • Possibly, check the Wrap around option

        • Select the Regular expression search mode

        • Click on the Mark All button

        • Then, click on the Copy Marked Text button

        • Open a new tab ( Ctrl + N )

        • Paste the clipboard’s contents ( Ctrl + V )


        If all your <a href=.....>........</a> definitions are contained in a single line, you may use the more restrictive regex :

        MARK (?-s)<a href=.+?>\K.+?(?=</a>)

        Best Regards,

        guy038

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors