Community
    • Login

    Replacement does not abide Regular Expression

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

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

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