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



  • 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.



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



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



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



  • @Scott-Sumner Thanks, awesome help



    • [list item]([link url]([link url]([link url](********************************
    • [link url]([link url]([link url](link url)))********************************))))

Log in to reply