# Filter Text Paragraphs

Quickly return all paragraphs that match a pattern or a regex

> Canonical page: https://elysiatools.com/en/tools/text-paragraph-filter

- **Category:** Text Processing

- **Keywords:** text, filter, paragraphs, pattern, regex, match, search, extract, Text Paragraph Filter

## Overview

The Filter Text Paragraphs tool allows you to quickly isolate specific sections of text by applying custom patterns, regular expressions, or structural criteria. It is designed to help you extract relevant information from large documents by filtering out unwanted content based on your specific requirements.

## Inputs

- **Text Input** (textarea): Enter text to filter paragraphs from...
- **Filter Type** (select)
- **Pattern/Text** (text): The pattern to match against (not used for all filter types)
- **Paragraph Separator** (select)
- **Case Sensitive** (checkbox): Match case when filtering
- **Preserve Original Formatting** (checkbox): Keep original spacing and line breaks
- **Output Format** (select)
- **Remove Duplicates** (checkbox): Remove duplicate paragraphs
- **Sort Alphabetically** (checkbox): Sort results alphabetically
- **Max Length** (text): Maximum paragraph length (for length filter type)
- **Max Words** (text): Maximum number of words (for word count filter type)
- **Max Lines** (text): Maximum number of lines (for line count filter type)

## When to use

- When you need to extract specific paragraphs from a long document based on keywords or patterns.
- When you want to clean up text by removing empty lines or duplicate paragraphs.
- When you need to reformat a large block of text into a structured list or HTML format.

## How it works

- Paste your source text into the input area and select your preferred paragraph separator.
- Choose a filter type, such as 'Contains Text', 'Regular Expression', or 'Word Count', and provide the necessary pattern.
- Configure optional settings like case sensitivity, sorting, or duplicate removal to refine your results.
- Select your desired output format and click process to generate the filtered text.

## Use cases

- Extracting all paragraphs containing specific email addresses or URLs from a raw data dump.
- Filtering out empty or short paragraphs to clean up a transcript or document.
- Converting a long text file into a formatted HTML or Markdown list for web content.

## Frequently asked questions

### Can I use regular expressions to filter my text?

Yes, select the 'Regular Expression' filter type and enter your regex pattern in the provided field.

### How does the tool identify a paragraph?

You can define a paragraph by selecting a separator such as double newlines, single newlines, or empty lines.

### Can I remove duplicate paragraphs from my text?

Yes, simply check the 'Remove Duplicates' option before processing your text.

### What output formats are supported?

You can output your filtered results as a bulleted list, numbered list, HTML paragraphs, Markdown, or plain text separated by spaces or newlines.

### Is the filtering case-sensitive?

By default, it is not, but you can enable the 'Case Sensitive' checkbox to ensure exact character matching.

## Related tools

- [Filter Text Sentences](https://elysiatools.com/en/tools/text-sentence-filter): Quickly return all sentences that match a pattern or a regex
- [Filter Words in Text](https://elysiatools.com/en/tools/text-word-filter): Quickly return words in text that match a pattern or a regex
- [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.
- [Line Number Remover](https://elysiatools.com/en/tools/line-number-remover): Remove line numbers from text or code with intelligent pattern recognition
- [Chinese Character Extractor (汉字提取器)](https://elysiatools.com/en/tools/chinese-character-extractor): Extract all Chinese characters from text, filtering out punctuation and English letters, numbers, and non-Chinese symbols
- [Emoji Extractor](https://elysiatools.com/en/tools/emoji-extractor): Extract all Unicode emoji from text, or optionally remove emojis
- [Bulk URL/Link Extractor](https://elysiatools.com/en/tools/bulk-url-extractor): Extract all HTTP/HTTPS links from text with deduplication and export options
- [IP Address Extractor](https://elysiatools.com/en/tools/ip-address-extractor): Extract IPv4 and IPv6 addresses from log files, server logs, network traces, or any text content

## Samples

- [Text with Emoji Samples](https://elysiatools.com/en/samples/text-with-emoji-samples): Mixed language text containing various Unicode emojis for testing emoji extraction
- [Regex Replace Samples](https://elysiatools.com/en/samples/regex-replace): Collection of common and useful regex replacement patterns for text transformation and data cleaning
- [Text with Date Samples](https://elysiatools.com/en/samples/text-with-date-samples): Text containing various date formats for testing date extraction and parsing
- [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

## Related content

- [Text Extraction Tools](https://elysiatools.com/en/hubs/text-extract): Explore 15 tools for extracting links, emails, phone numbers, dates, emojis, HTML attributes, and other structured signals from mixed text.
- [Text Case, Encoding, and Normalization Conversion Tools](https://elysiatools.com/en/hubs/text-convert): Compare text case conversion, character-width conversion, encoding conversion, quoted-printable handling, and inline text normalization tools in one hub.
- [Text Tools](https://elysiatools.com/en/hubs/text-utility): Explore 33 text tools for utility workflows and compare closely related utilities quickly.
- [Text Analysis, Readability, and Content Inspection Tools](https://elysiatools.com/en/hubs/text-analyze): Compare text statistics, language detection, readability scoring, sentiment analysis, moderation review, and pattern analysis tools in one hub.
