Community
    • Login

    starting new lines with numbers (with characters "." or "-") to start new line with a blank space

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    6 Posts 3 Posters 1.5k 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.
    • MarkomarinM
      Markomarin
      last edited by

      Hi guys,
      I have a text like this
      “1- I always use …
      A) any
      B) the whole
      C) a little 2- … who enjoys spicy food…
      A) No one/each
      B) Everyone/all
      C) Someone/any
      D) Anyone/some
      E) One/none 3- ‘Sunny Delight’ …
      A) much
      B) less
      C) more”
      I need the one in the following
      "1- I always use …
      A) any
      B) the whole
      C) a little

      2- … who enjoys spicy food…
      A) No one/each
      B) Everyone/all
      C) Someone/any
      D) Anyone/some

      3- ‘Sunny Delight’ …
      A) much
      B) less
      C) more"
      It would be great if I can do this,
      Thanks in advance.

      Scott SumnerS 1 Reply Last reply Reply Quote 2
      • Scott SumnerS
        Scott Sumner @Markomarin
        last edited by

        @Markomarin

        This should get you close given that your example may not be exhaustive:

        Open the Replace window (press ctrl+h), then:

        Find what zone: (?=\x20\d+-)
        Replace with zone: \r\n\r\n
        Search mode: Regular expression
        Action: Replace or Replace All

        Note: assumes Windows line-endings (\r\n).

        MarkomarinM 2 Replies Last reply Reply Quote 2
        • MarkomarinM
          Markomarin @Scott Sumner
          last edited by Markomarin

          @Scott-Sumner Thanks for your nice and wise reply. It worked for me but one thing is missing that is;

          1. there is a one (blank) space before the numbers, how can it be removed within this formula.
          2. Just another thing is how can I do the same operation without numbers (starting new line) and the character and space with it. just like;

          "a) aaaaa
          b) nnnnn

          ‘Sunny Delight’ …
          a) hdhhddhh
          b)dkdkdkdk

          I always use …"

          Scott SumnerS 1 Reply Last reply Reply Quote 2
          • Scott SumnerS
            Scott Sumner @Markomarin
            last edited by

            @Markomarin said:

            …there is a one (blank) space before the numbers…

            Ah yes, that skipped my notice…so I’ll give you one more:

            Find what zone: \x20\d+-\x20
            (everything else same as before)

            For further help, consider helping yourself and see here.

            1 Reply Last reply Reply Quote 2
            • MarkomarinM
              Markomarin @Scott Sumner
              last edited by

              @Scott-Sumner Thanks, awesome help

              1 Reply Last reply Reply Quote 1
              • 蘇浩宇蘇
                蘇浩宇
                last edited by

                • [list item]([link url]([link url]([link url](********************************
                • [link url]([link url]([link url](link url)))********************************))))
                1 Reply Last reply Reply Quote -1
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors