• Login
Community
  • Login

merge specific lines

Scheduled Pinned Locked Moved General Discussion
7 Posts 3 Posters 351 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.
  • ?
    A Former User
    last edited by Nov 5, 2020, 3:45 PM

    how to merge specific lines containing specific characters to be move as 1 line. Please see the example below.
    Line 3 - 6 should be merge in Line 2. same with the others.

    db3d2a85-606c-4d5e-856c-c3050cf568da-image.png

    1 Reply Last reply Reply Quote 0
    • ?
      A Former User
      last edited by Nov 5, 2020, 3:58 PM

      @guy038 Please if u can help me

      A 1 Reply Last reply Nov 5, 2020, 4:03 PM Reply Quote 0
      • A
        Alan Kilborn @A Former User
        last edited by Nov 5, 2020, 4:03 PM

        @Ervin-Sanchez

        This is your second posting with the same information in a very short time.
        Please don’t do that, it wastes everyone’s bandwidth.

        Very people sit here and monitor these posts (what am I saying?? :-) ) so if you don’t get an instant response…then WAIT (or work on the problem yourself–there’s a thought!)

        ? A 2 Replies Last reply Nov 5, 2020, 4:05 PM Reply Quote 0
        • ?
          A Former User @Alan Kilborn
          last edited by Nov 5, 2020, 4:05 PM

          @Alan-Kilborn said in merge specific lines:

          I saying?? :-) ) so if you don’t get an instant respons

          Understood Thank you :)

          1 Reply Last reply Reply Quote 0
          • A
            Alan Kilborn @Alan Kilborn
            last edited by Nov 5, 2020, 4:06 PM

            @Alan-Kilborn said in merge specific lines:

            Very people

            The “few” was in between these words in my brain…what happened to it? :-)

            1 Reply Last reply Reply Quote 1
            • T
              Terry R
              last edited by Nov 5, 2020, 6:41 PM

              @A-Former-User said in merge specific lines:

              merge specific lines

              So it would seem a line starting with a number is the start. Any line NOT starting with a number is a continuation of the previous line.

              So we have, using the Replace function
              Find What:\R(?=\d)
              Replace With: a single space in this field.

              So we remove the carriage return/line feed and replace with a single space. I haven’t actually tested this as not on my PC, but I feel confident it will work.

              Terry

              1 Reply Last reply Reply Quote 0
              • T
                Terry R
                last edited by Nov 5, 2020, 7:13 PM

                @Terry-R said in merge specific lines:

                Find What:\R(?=\d)

                Sorry there was a typo.

                It should be \R(?!\d)
                So looking for a line following that does NOT have a number at the start.

                Apologies

                Terry

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