inserting line breaks after every record in the textpad

Monnie_tester picture Monnie_tester · Sep 24, 2013 · Viewed 35.1k times · Source

I have a textpad file that has rows of text. For e.g.

Cat: Meaning - animal. The cat ran up the house
Rat: Meaning- rodent. The rat lives in the borough and feeds on leftovers
Word 3: Description
Word 4: Description

I have many such record in my file. I want to insert a line break at the end of every record for proper presentation. Doing it manually is tedious. Please help if you know an automated process to insert line break.

Answer

hargobind picture hargobind · Nov 1, 2013

You can quickly do this by using a feature called "Regular Expressions" to find and add empty lines.

  1. Open up the Find/Replace (Search menu > Replace)
  2. In the "Find what" field, type the following: (^.+$)\n(^.+$)
  3. In the "Replace with" field, type the following: \1\n\n\2
  4. Tick the "Regular expression" checkbox
  5. Click the Replace All button at least twice, but perhaps 3 times, until you get the message Cannot find the Regular Expression
  6. Untick the "Regular expression" checkbox
  7. Close the Replace dialog
  8. Confirm the file is formatted as you are expecting
  9. Save the file.