Community
    • Login

    Find / Replace "><" with ">", "Enter", "<"

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 1 Posters 1.8k Views 1 Watching
    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.
    • Mark du PreezM Offline
      Mark du Preez
      last edited by Mark du Preez

      I have an HTML document with multiple <tags> right after each other. I would like to edit it so that all tags start on a new line so

      <ul class=“mh-sub”><li class=“odd”><p class=“mh-no-listing”>Some text</p></li></ul>

      becomes

      <ul class=“mh-sub”>
      <li class=“odd”>
      <p class=“mh-no-listing”>Some text</p>
      </li>
      </ul>

      Note that the </p> is fine where it is.

      Is it possible to use Find / Replace to do this? Obviously I would find “><”, but what would I enter into the replace box? I realise that using this method, lines like this:

      <script src=“1_files/1701549626756830.js” async=“”></script>

      which is fine as it is, would become

      <script src=“1_files/1701549626756830.js” async=“”>
      </script>

      but that is also fine.

      If I can’t use Find / Replace, is there something else I can do?

      1 Reply Last reply Reply Quote 0
      • Mark du PreezM Offline
        Mark du Preez
        last edited by

        The answer is to use “>\n<” in the Replace box.

        I had actually tried this before posting the question, but accidently used /n instead of \n.

        1 Reply Last reply Reply Quote 0

        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
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors