• Login
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.
  • M
    Markomarin
    last edited by Jul 23, 2018, 11:44 AM

    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.

    S 1 Reply Last reply Jul 23, 2018, 11:55 AM Reply Quote 2
    • S
      Scott Sumner @Markomarin
      last edited by Jul 23, 2018, 11:55 AM

      @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).

      M 2 Replies Last reply Jul 23, 2018, 12:07 PM Reply Quote 2
      • M
        Markomarin @Scott Sumner
        last edited by Markomarin Jul 23, 2018, 12:08 PM Jul 23, 2018, 12:07 PM

        @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 …"

        S 1 Reply Last reply Jul 23, 2018, 12:26 PM Reply Quote 2
        • S
          Scott Sumner @Markomarin
          last edited by Jul 23, 2018, 12:26 PM

          @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
          • M
            Markomarin @Scott Sumner
            last edited by Jul 23, 2018, 12:30 PM

            @Scott-Sumner Thanks, awesome help

            1 Reply Last reply Reply Quote 1
            • 蘇
              蘇浩宇
              last edited by Jul 27, 2018, 5:27 PM

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