Remove single line breaks, keep “empty” lines

前端 未结 4 614
孤街浪徒
孤街浪徒 2020-12-19 04:06

Say I have text like the following text selected with the cursor:

This is a test. 
This 
is a test.

This is a test. 
This is a 
test.

I wo

4条回答
  •  死守一世寂寞
    2020-12-19 05:00

    I believe this will work:

    text=
    (
    This is a test. 
    This 
    is a test.
    
    This is a test. 
    This is a 
    test.
    )
    MsgBox %    RegExReplace(text,"\S\K\v(?=\S)",A_Space)
    

提交回复
热议问题