Community
    • Login

    Regex: Remove space of unfinished sentences whose words continue on a new line

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 3 Posters 389 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.
    • Hellena CrainicuH
      Hellena Crainicu
      last edited by Hellena Crainicu

      hello. I have some unfinished sentences whose words continue on a new line. See the print screen below.

      So, I need to link those words again in the same sentence, in continuation of that line.

      Untitled.png

      So, I made a regex:

      FIND: \s\R
      REPLACE BY: \x20

      The only problem is that my regex will bring absolutely all the lines closer together, even the paragraphs.

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

        Hello @hellena-crainicu,

        Please, instead of a picture, could you provide us raw text, in reverse video, like below :

        Text to analyse
        

        Thanks,

        BR

        guy038

        Hellena CrainicuH 1 Reply Last reply Reply Quote 0
        • Neil SchipperN
          Neil Schipper @Hellena Crainicu
          last edited by

          @hellena-crainicu This exact problem was recently solved here.

          Hellena CrainicuH 1 Reply Last reply Reply Quote 1
          • Hellena CrainicuH
            Hellena Crainicu @guy038
            last edited by Hellena Crainicu

            Please, instead of a picture, could you provide us raw text, in reverse video, like below :

            Text to analyse
            

            Starting the point luate de (from this point starts the problem)

            Considerat ca parte umilă a artei, „rnește-șugnl“, atît de respectat odinioară, a fost dat uitării, cu timpul, in mod imprudent. în prezent, mulți se întorc la el, înțelegînd insuficiența experiențelor izolate, a „pornirii de Ia zero“ ca îs Robinson pe insula sa și a micilor rețete luate de
            ici, de colo, al căror efect strălucitor are consecințe triste. Aceasta pentru că epoca noastră,

            1 Reply Last reply Reply Quote 0
            • Hellena CrainicuH
              Hellena Crainicu @Neil Schipper
              last edited by

              @neil-schipper

              @hellena-crainicu This exact problem was recently solved here.

              SUPER ANSWER. Your solution is great:

              FIND: (?<=[^\r\n])\R(?=[^\r\n])

              Also, the one made by @guy038 is super:

              FIND: (?<!\n|\r)\R(?!\R)

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