How to break lines at a specific character in Notepad++?

前端 未结 6 1658
[愿得一人]
[愿得一人] 2021-01-29 20:44

I have a text file containing text like:

[\'22APR2012 23:10\', \'23APR2012 07:10\', 1, 3, 0], [\'22APR2012 23:10\', \'23APR2012 07:20\', 1, 3, 0], [\'22APR2012 2         


        
6条回答
  •  悲哀的现实
    2021-01-29 21:25

    If you are looking to get a comma separated string into a column with CR LF you wont be able to do that in Notepad++, assuming you didn't want to write code, you could manipulate it in Microsoft Excel.

    If you copy your string to location B1:

    A2 =LEFT(B1,FIND(",",B1)-1)
    B2 =MID(B1,FIND(",",B1)+1,10000)
    

    Select A2 and B2, copy the code to successive cells (by dragging):

    A3 =LEFT(B2,FIND(",",B2)-1)
    B3 =MID(B2,FIND(",",B2)+1,10000)
    

    When you get #VALUE! in the last cell of column A replace it with the previous rows B value.

    In the end your A column will contain the desired text. Copy and past it anywhere you wish.

提交回复
热议问题