Community
    • Login

    Replacement does not abide Regular Expression

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 2 Posters 630 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.
    • CsyeCokTheSollyC Offline
      CsyeCokTheSolly
      last edited by

      So I was doing some things on notepad++ and I was trying to replace with Regular Expression but finds out it doesn’t abide by it’s options. Is there anything else I can do to replace with newline?
      7715eeb5-2087-40eb-b83e-9a4222bed676-image.png

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

        @csyecokthesolly

        You’ve told the software that you want a . in your find expression to possibly match a newline character – and that’s exactly what it is doing for you.

        It is hard to tell what you really want, but perhaps you want to do your search in Normal Search mode?

        CsyeCokTheSollyC 1 Reply Last reply Reply Quote 1
        • CsyeCokTheSollyC Offline
          CsyeCokTheSolly @Alan Kilborn
          last edited by

          @alan-kilborn I’m trying to replace multiple lines with a replacement with multiple new lines.

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

            @csyecokthesolly said in Replacement does not abide Regular Expression:

            I’m trying to replace multiple lines with a replacement with multiple new lines.

            OK, well then you can use Regular expression mode.
            You can use a \R in the Find what box to match a line-ending character when you search.
            In the Replace with box, you have to use, for Windows, \r\n when you want to insert a line-ending.

            CsyeCokTheSollyC 1 Reply Last reply Reply Quote 1
            • CsyeCokTheSollyC Offline
              CsyeCokTheSolly @Alan Kilborn
              last edited by

              @alan-kilborn Thanks. That problem doesn’t occur now.

              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