Categories

Filter Text Paragraphs

Quickly return all paragraphs that match a pattern or a regex

The pattern to match against (not used for all filter types)

Match case when filtering

Keep original spacing and line breaks

Remove duplicate paragraphs

Sort results alphabetically

Maximum paragraph length (for length filter type)

Maximum number of words (for word count filter type)

Maximum number of lines (for line count filter type)

Key Facts

Category
Text Processing
Input Types
textarea, select, text, checkbox
Output Type
text
Sample Coverage
4
API Ready
Yes

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.

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.

Examples

1. Extracting Contact Information

Data Analyst
Background
I have a long document containing various notes and contact details mixed together.
Problem
I need to isolate only the paragraphs that contain email addresses.
How to Use
Paste the document, select 'Contains Email' as the filter type, and choose 'Bullet Points' as the output format.
Outcome
A clean, bulleted list of all paragraphs containing email addresses is generated.

2. Cleaning Up Transcripts

Content Creator
Background
I have a raw transcript with many empty lines and repetitive filler sentences.
Problem
I need to remove empty lines and ensure the text is concise.
How to Use
Select 'Non-Empty Paragraphs' as the filter type and enable 'Remove Duplicates' to clean the content.
Outcome
A refined version of the transcript with all empty lines and duplicate entries removed.

Try with Samples

video, text, regex

Related Hubs

FAQ

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.

API Documentation

Request Endpoint

POST /en/api/tools/text-paragraph-filter

Request Parameters

Parameter Name Type Required Description
textInput textarea Yes -
filterType select Yes -
pattern text No The pattern to match against (not used for all filter types)
paragraphSeparator select Yes -
caseSensitive checkbox No Match case when filtering
preserveFormatting checkbox No Keep original spacing and line breaks
outputFormat select Yes -
removeDuplicates checkbox No Remove duplicate paragraphs
sortAlphabetically checkbox No Sort results alphabetically
maxLength text No Maximum paragraph length (for length filter type)
maxWords text No Maximum number of words (for word count filter type)
maxLines text No Maximum number of lines (for line count filter type)

Response Format

{
  "result": "Processed text content",
  "error": "Error message (optional)",
  "message": "Notification message (optional)",
  "metadata": {
    "key": "value"
  }
}
Text: Text

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-text-paragraph-filter": {
      "name": "text-paragraph-filter",
      "description": "Quickly return all paragraphs that match a pattern or a regex",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=text-paragraph-filter",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

If you encounter any issues, please contact us at [email protected]