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.8k 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.
    • MarkomarinM Offline
      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 Offline
        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 Offline
          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 Offline
            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 Offline
              Markomarin @Scott Sumner
              last edited by

              @Scott-Sumner Thanks, awesome help

              1 Reply Last reply Reply Quote 1
              • 蘇浩宇蘇 Offline
                蘇浩宇
                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

                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