0

How do I replace a line in TextPad ' with nothing (ie: delete lines with just that one character)?

I have an Excel Spreadsheet containing three columns:

Column A - single quote
Column B - some number
Column C - single quote plus a comma

There are over 90,000 rows on this spreadsheet with data in column B. There are over one million rows with just a single quote in column A because I did a "Ctrl+D" on that column to copy the value in that column (a single quote) down to all rows.

When I copy and paste these three columns into TextPad, I end up with over one million lines. I replaced the tabs with nothing using the F8/Replace dialog. (Replace: tab with: empty string)

The majority of what is left are lines that contain only a single quote. I want to delete these 900,000 extra lines.

How do I specify a Replace (delete) of single quote + line feed. I do not want to delete any of the single quotes from the lines that include a number that came from column B.

LeHill
  • 449
  • 7
  • 13

2 Answers2

0

I just figured it out. The backslash n is the line feed.

If I check Regular Expression and enter this Find what:

'\n

(Keeping empty string for Replace with) and Replace All, I have deleted those extra lines.

LeHill
  • 449
  • 7
  • 13
0

I also experienced the same...it did not work for me until I did this:

uncheck the regular expression first before entering \n in the find box and replacing with whatever you chose to (in my case, it was ',').

Your result might be an entire list becoming transposed (that's what happened to my data).