# Odd Line Extractor

Extract odd-numbered lines from text content with support for various indexing methods and custom criteria

> Canonical page: https://elysiatools.com/en/tools/odd-line-extractor

- **Category:** Text Processing

- **Keywords:** odd, line, extract, select, filter, odd-lines, odd-rows, alternating

## Overview

The Odd Line Extractor is a specialized text processing tool designed to isolate and extract specific lines from your documents based on numerical patterns, indexing methods, and custom criteria.

## Inputs

- **Text Content** (textarea): Enter or paste your text content here... Line 1 Line 2 Line 3 Line 4 Line 5
- **Counting Method** (select)
- **Start Index** (number): Starting index (default: 1)
- **Trim White Space** (checkbox)
- **Include Empty Lines** (checkbox)
- **Preserve Original Line Numbers** (checkbox)
- **Show Line Numbers in Output** (checkbox)
- **Output Format** (select)

## When to use

- When you need to separate alternating data points from a long list or log file.
- When cleaning up datasets that contain interleaved headers or metadata on even lines.
- When you need to extract specific segments of text based on custom index patterns for data analysis.

## How it works

- Paste your text content into the input area.
- Select your preferred counting method, such as 1-based indexing or alternating patterns.
- Configure optional settings like trimming whitespace or including empty lines to refine your results.
- Choose your desired output format, such as a numbered list, CSV, or plain text, and generate the extracted content.

## Use cases

- Filtering interleaved log files to isolate specific event entries.
- Extracting data from formatted text reports where every second line contains secondary information.
- Preparing structured text data for import into spreadsheet software using CSV or table formats.

## Frequently asked questions

### Can I extract even lines instead of odd lines?

Yes, by selecting the 'Even-Based' counting method or adjusting the start index, you can target even-numbered lines.

### Does the tool support large text files?

The tool is optimized for standard text processing tasks; simply paste your content into the text area to begin extraction.

### Can I keep the original line numbers in the output?

Yes, enable the 'Preserve Original Line Numbers' option to maintain the context of your source text.

### What output formats are available?

You can export your results as a numbered list, table, JSON, CSV, or plain text.

### How does the 'Custom Pattern' method work?

The custom pattern allows you to define specific line intervals beyond standard odd/even sequences for more complex extraction needs.

## Related tools

- [Even Line Extractor](https://elysiatools.com/en/tools/even-line-extractor): Extract even-numbered lines from text content with support for various indexing methods and custom criteria
- [Phone Number Extractor](https://elysiatools.com/en/tools/phone-number-extractor): Extract phone numbers from mixed text with support for multiple countries and formats
- [SRT / ASS Subtitle Text Extractor](https://elysiatools.com/en/tools/srt-ass-subtitle-extract-text): Extract clean dialogue text from pasted SRT, ASS, or SSA subtitles.
- [Line Skip Extractor](https://elysiatools.com/en/tools/step-line-extractor): Extract lines from text at regular intervals with customizable skip and extract patterns. Perfect for sampling every Nth line or extracting multiple lines with gaps.
- [Text Line Extractor](https://elysiatools.com/en/tools/text-line-extractor): Extract specific lines from text by line numbers or ranges
- [Upside-Down Text](https://elysiatools.com/en/tools/upside-down-text): Flip text upside-down (ɥǝllo) with per-letter rotations, plus optional toggles to keep reading order and protect URLs/emails. Plain Unicode text, no font needed.
- [AI Currency & Number Extractor (AI货币数字提取器)](https://elysiatools.com/en/tools/ai-currency-extractor): Use AI to intelligently extract numbers, currencies, and financial amounts from text with their original formatting preserved
- [Bulk Email Extractor](https://elysiatools.com/en/tools/bulk-email-extractor): Extract all email addresses from input text, articles, web source code, or mixed content. Supports deduplication and export to JSON.

## Samples

- [Duplicate Line Samples](https://elysiatools.com/en/samples/text-duplicate-line-samples): Sample files with various types of duplicate lines for testing duplicate removal tools
- [Changelog Extractor Samples](https://elysiatools.com/en/samples/changelog-extractor): Various changelog formats for testing changelog parsing and extraction tools
- [Markdown Link Extractor Samples](https://elysiatools.com/en/samples/markdown-with-links): Sample Markdown documents with various link types for testing the Markdown Link Extractor tool
- [Phone Number Extractor Samples](https://elysiatools.com/en/samples/phone-number-extractor): Collection of mixed text containing phone numbers from various countries for extraction testing
