Hongmu Notes

1️⃣ Text filter odd lines

Paste the text and take out the odd lines by line number (lines 1, 3, 5…).

Text filter odd lines

Instructions for use

  • Paste multiple lines of text and click "Start Processing" to extract odd-numbered lines by line number.
  • If you want to get the other half, please use the "Text Filter Even Lines" tool
  • All is done locally in the browser, and the input content will not be uploaded.

Odd row filter

Interlaced sampling according to line numbers is a common technique for organizing text: take half of the odd-numbered lines and half of the even-numbered lines, and the two together are the original text.

📌 How many rows can be processed at one time

The input box supports long text, and hundreds or even thousands of lines can be processed at one time by pasting; the judgment only relies on line numbers, so it is very fast. The number of lines in the result is about half of the original text (one more line when the number of lines in the original text is odd).

📌 How is the line number calculated?

Count in natural order starting with the first row: row 1 is an odd row, row 2 is an even row, and so on. A blank line also occupies a line number, so the position of the blank line will directly affect the parity of subsequent lines. It is recommended to confirm the blank line status of the original text before processing; if the original text has a newline character at the end, an extra line will not be calculated.

🧭 What scenarios are it commonly used in?

Splitting a text into two parts based on line numbers, sampling from a large text at fixed intervals, and checking whether the exported two columns of data are aligned row by row, all use interlaced sampling. Take odd-numbered rows on this page, and cooperate with "Get even-numbered rows" to complete the split. The sum of the two rows should equal the number of rows in the original text.

All keywords and tutorials 12

❓ FAQ

Will blank lines affect the results?
meeting. A blank line also occupies a line number. Changes in position will change the parity of subsequent lines. It is recommended to confirm the status of the blank line first.
Will the row content be changed?
No. The hit line is output as is, with spaces and punctuation retained.
How to generally use odd-numbered row filtering
Paste the text into the input box, and the result box will contain all the odd-numbered lines. If you copy it, you will get half of the content.