我想使用Xcode的查找和替换正则表达式通过删除在我的代码不必要的空白行代替两个空行。换句话说,我要取代这个:正则表达式用一个空行
NSString *helloString = @"Hello";
helloString = [helloString stringByAppendingString:@" World"];
有了这个:
NSString *helloString = @"Hello";
helloString = [helloString stringByAppendingString:@" World"];
我试着输入控制+ Q回报控制+ Q在搜索框中回报(通过this answer的启发,但它没有匹配。
瓦在正则表达式应该是什么?
谢谢。这适用于空行中没有制表符或空格的情况。 – Eric