i've tried other regexes that are supposed to be able to remove blank lines from a document, but none of them seem to work within BBEdit's find-and-replace.
What is a regex for stripping blank lines from a document that will work in bbedit?
Check the "Use grep" and "Delete matched lines" box. Uncheck all others. There is no 'Delete matched lines' option in BBEdit 12. Your method only works on lines containing at least one space symbol.
Open TextPad and the file you want to edit. Click Search and then Replace. In the Replace window, in the Find what section, type ^\n (caret, backslash 'n') and leave the Replace with section blank, unless you want to replace a blank line with other text. Check the Regular Expression box.
First you need to open the file with Notepad++. Once the document is loaded, select Edit > Line Operations > Remove Empty Lines. Voilà, every single blank lines has been deleted.
I'm going to assume that there may be whitespace in the lines you wish to remove. This should do the trick:
^\s*?\r
(replace with nothing, make sure the "Grep" checkbox is ticked)
BBEdit.. Text --> process duplicate lines. Delete duplicate lines
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With