Community
    • Login

    translate \r\n

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 2.2k 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.
    • Stuart HerringS Offline
      Stuart Herring
      last edited by

      (There is quite a lot to search through, here, so I hope I’m not replicating an existing query with this…)

      I just parsed a large (15 MB) .json file and am editing it in NPP. I wish to replace all the untranslated \r and \n codes with their equivalents: actual <CR><LF> characters, to improve the readability.

      I’m trying to use the Win10 search-and-replace function, but I can’t find a way to make it accept escape codes (such as ^J, ^M, etc.) as characters to replace \r and \n.

      Is there a well-known, and/or quick-and-dirty, way to achieve this?

      Thanx!

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA Offline
        Alan Kilborn @Stuart Herring
        last edited by

        @Stuart-Herring

        I would use Regular expression Search mode and in the replace field simply use \r for carriage return and \n for linefeed.

        If you want to search for untranslated versions, use \\r or \\n in the find field.

        1 Reply Last reply Reply Quote 2
        • Stuart HerringS Offline
          Stuart Herring
          last edited by

          Thanx!
          I’m not yet trained in the use of RegExes, but I can get there…

          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