Announcement

Collapse
No announcement yet.

Delete All Blank Lines (or Lines with Whitespace only)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Delete All Blank Lines (or Lines with Whitespace only)

    I've tried all the regex tricks that work in all the other editors I use, and I can't seem to figure out how to Find and Replace, Select and Delete, or in any other way quickly remove blank lines that are sprinkled throughout millions of lines of text in my compare files. Anyone have a simple solution using BC3?
    BC v4.0.7 build 19761
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

  • #2
    There isn't. BC's regular expression matching only works line-by-line. I haven't been able to figure out how to make our regular expression engine work across lines without copying the entire file into a contiguous memory block.
    Zoë P Scooter Software

    Comment


    • #3
      Please consider adding a "Trim black lines" feature to the product, then. I know you've had at least one request to "Pad null lines" with physical blank lines (to serve as permanent alignment place-holders). You might consider adding these two features together.
      BC v4.0.7 build 19761
      ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

      Comment


      • #4
        Thanks, Michael. I'll add it to the wishlist. I would recommend processing your files with another Text Editor program to remove the blank lines.
        Aaron P Scooter Software

        Comment


        • #5
          Thanks for the suggestion, Aaron, but that really wasn't an option since the whole reason there were blank lines is because I was filtering millions of lines based on differences, performing regex find and replace commands to remove problematic lines then recompare. Jumping in and out of BC3 and another editor would have been extremely disruptive to the task, especially with files of this size that took several minutes to refresh each compare.
          BC v4.0.7 build 19761
          ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

          Comment

          Working...
          X