Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
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.
Posted
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..
Posted
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?

Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...