Select Every Other Line of a Text File on Textmate

❦ First Published on

Lets say you have a YouTube transcript text file structured like this:

so I think the difference in in a poem
or a work of literary artists that we
say story know is that it isn’t for the

You want to select the lines with numbers and delete them.

In my case I’m using the Textmate text editor, but the following technique using regular expressions, sequences of characters that specify a pattern to match on a text, should work with other editors, like Notepad++, too:

  1. Press Cmd-F to open the search dialog box. Make sure the Regular Expression checkbox is ticked.
  2. Put the following in Find:
  3. And this in Replace (notice the space before $):
  4. Click Replace All.

· ˖ ✦ . ˳

Possibly Related:

˳ · ˖

Prior entry:
Next entry: