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 1.1k Views 2 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.
    • Hellena CrainicuH Offline
      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 Online
        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 Offline
          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 Offline
            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 Offline
              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

              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