我想使用Xcode的查找和替換正則表達式通過刪除在我的代碼不必要的空白行代替兩個空行。換句話說,我要取代這個:正則表達式用一個空行
NSString *helloString = @"Hello";
helloString = [helloString stringByAppendingString:@" World"];
有了這個:
NSString *helloString = @"Hello";
helloString = [helloString stringByAppendingString:@" World"];
我試着輸入控制+ Q回報控制+ Q在搜索框中回報(通過this answer的啓發,但它沒有匹配。
瓦在正則表達式應該是什麼?
謝謝。這適用於空行中沒有製表符或空格的情況。 – Eric