rbulph Posted April 19, 2006 Posted April 19, 2006 Is there any automated way to cut out all superfluous blank lines from my code, i.e. so that there are never two consecutive blank lines? I've found the "Delete Horizontal White Space" command, but nothing comparable for vertical white space. Quote
mskeel Posted April 19, 2006 Posted April 19, 2006 You could write a quick tool that would do it. Regular expressions would be the way to go. In fact, even easier, maybe a find and replace using regular expressions for consecutive newlines with whitespace only in between would work.. Quote
rbulph Posted April 19, 2006 Author Posted April 19, 2006 You could write a quick tool that would do it. Regular expressions would be the way to go. In fact' date=' even easier, maybe a find and replace using regular expressions for consecutive newlines with whitespace only in between would work..[/quote'] Yes, a find and replace would be fine. Find two consecutive new lines with one new line would be good enough. But I don't know how to use regular expressions (I tried downloading a sample included in the help files, but it wouldn't work). Any chance of letting me know what I need to put in the find and replace boxes to do this? Quote
mskeel Posted April 19, 2006 Posted April 19, 2006 The regular expressions used for find and replace are slightly different than the System.Text.Regular expressions and I actually have no idea how they work :(. There should be some help files in the MSDN that can point you in the right direction, though. I have happened across those from time to time when looking for information on the System.Text.Regular expressions. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.