

- ULTRAEDIT REMOVE BLANK LINES HOW TO
- ULTRAEDIT REMOVE BLANK LINES CODE
- ULTRAEDIT REMOVE BLANK LINES FREE
It's lightning fast and it is superior to my original macro.
ULTRAEDIT REMOVE BLANK LINES CODE
It's AMAZING!!!!!!!!!! I tested it on 10,000 lines and it was finished running in less than a second!!!!!!!!!!!!!!! Mofi, I took your advice and hopefully the code that I posted in the 1st code box will accomplish what you suggested.

Thank you very much for reposting pietzckers' Perl code for my convenience, and of course, thank you pietzcker for posting it originally. Real life got very hectic all of a sudden and once again, you gave me quite a lot to think about, Mofi.

But macro above is much faster.įirst of all, I apologize for taking so long to reply. Your macro could be improved a little bit, see below (removed later). Simply running a non regular expression Find searching for : executed with advanced option button Show Lines (show just lines with a colon, hide all other), or Hide Lines (hide all lines with a colon, only show all other) and using Edit - Delete - Delete All Hidden Lines produce the same result without the need to use a macro which must be modified for every search, or using a Perl regular expression replace without knowing how it works. But it is very easy to create a copy of the source file and replace in the copy all lines containing a colon to get the opposite result.Īnd users of UE v16.00 or later don't need a macro for that job at all. Of course that macro does not record the deleted lines. The best method is the usage of the Perl regular expression replace all as posted by pietzcker to delete all lines not containing a colon.įind MatchCase RegExp "^(?:(?! :).)*$(?:\r?\n|\r)?" Thanks for listening! :)Įdit: Macro code replaced by a new version, see my next post. If this macro works for you, please let me know and even more importantly, if it does NOT work for you, please be sure to post a message in this thread. I've tested this on my UE and it's working great!!! My version of UE is 14.
ULTRAEDIT REMOVE BLANK LINES FREE
It's designed to cut and append all lines that don't have a colon in them and when it's done running, just in case you wanted to use the data that was cut out, I left it on clipboard 9 and did NOT clear the clipboard so if you want to use that data, you simply paste and presto, all the words that were cut out in one neat list! So I hope everyone interested in this subject, will feel free to try my macro and if you want to use it for something other than cutting out lines without colons, all you have to do is go to:Īnd replace the colons with something else like the word "images" And it should be the fastest method for removing the lines that don't contain this word, provided that the number of lines that are missing this word is less than the number of lines containing the word! If I was making a macro, I would include find and replace all td tags with rt class and then Find td to get the desired result, but I've been using a word list for input and there is no specific symbol or word that I can use so then one day, all of a sudden, I had the thought, why not make my own symbol by using column insert, and then use a find and replace RegExp to remove that particular symbol from the lines that do contain colons, then take and slightly modify the code that you posted above and cut and append all lines with that particular symbol!!!? But the big problem for me was that there were no specific symbols for me to search for.įor example, for the problem in this thread: Find one word and other not present in the line In my example, I had thousands of lines that had colons and less than 20 that were missing colons.
ULTRAEDIT REMOVE BLANK LINES HOW TO
That's the reason why I've been trying to figure out how to target and remove lines that do not have a colon. However, in most cases I've dealt with so far, unfortunately the lines containing the keyword, phrase or symbol far outnumber the lines that are missing the keyword, phrase or symbol. I've been thinking about this problem for a couple of weeks now and the other day, the solution finally came to me!!! GrandMaster Mofi, your macro is the best and fastest solution if the number of lines containing the keyword, phrase or symbol is less than the number of lines that are missing the keyword, phrase or symbol.
