Tools84

TEXT FORMATTING / A PRACTICAL GUIDE

How tokeep or remove matching text lines

Keep or remove lines matching a phrase.

Filter a multiline list by a literal word or phrase, with optional case and whole-word matching.

Follow the guide
A real before-and-after example
Before Input for conditional text line removal

The original source text.

After Actual output for conditional text line removal

The downloaded text result.

The comparison uses the original input and the actual downloaded result.
Advertisements
QUICK VIDEO TUTORIAL Remove matching text lines Remove matching text lines English narration Watch the video

Remove matching text lines

Advertisements

Filter a multiline list by a literal word or phrase, with optional case and whole-word matching. Follow the exact input and settings below to reproduce this example. Open Conditional Text Line Removal.

01

Prepare the source text

Open Conditional Text Line Removal and choose Write or paste text, or upload a supported UTF-8 text file. The upload opens the editor; it does not run the tool. This example uses the exact source shown in the comparison.

Maximum input and result: 1 MB of UTF-8 text, with a 1,048,576-character input ceiling. Expanding transformations must also fit the result limit.

Use the exact example input
apple pie
banana bread
Apple juice

This text operation runs in your browser; its source and result are not sent for conversion. A draft may be kept in this browser tab when session storage is available. Clear removes the current draft; download important work before closing the tab.

02

Choose the settings

For the recorded example, use these settings: Find text: apple; Matching lines: Remove matching lines; Match case: Off; Whole words only: Off.

Find text is matched separately against each line. Remove matching lines discards lines containing a match; Keep matching lines returns only those lines. Match case is off initially. Whole words only prevents a match when a letter, number or underscore sits directly next to the search phrase. An empty search leaves the text unchanged.

Find text
apple
Matching lines
Remove matching lines
Match case
Off
Whole words only
Off

The example in this guide

Verified in the i2TEXT browser workflow on November 11, 2026.

Input
example.txt
Output
conditional-text-line-removal.txt
Saved result
12 bytes
03

Apply and inspect the result

Select Conditional Text Line Removal when the input and settings are ready. In the saved example, the result begins: "banana bread".

This matches literal text rather than regular expressions. Filtering removes whole lines, not only the matching words.

Result overview separates Matching lines from Lines removed and shows the input-to-result line totals. In Keep matching lines mode, the removed count describes the nonmatching lines, not the matches you retained.

Result overview distinguishes changed, unchanged and empty results. An unchanged result means the selected operation did not alter the text; an empty result can be the expected outcome of removal or extraction. Line totals include a trailing empty line; an empty result has zero lines.

04

Save the version you reviewed

Review the current result, then use the download icon to save a TXT file. The actual download in this example is named conditional-text-line-removal.txt. Copy and download use the current result, so make any final wording changes before saving. Continue to can carry the result into a compatible next tool, where you review it before running another operation.

Editing the result hides the calculated details until you run the tool again. Copy and TXT download use the edited text; return to the source and reapply the tool to refresh the report.

The reviewed copy is ready

example.txtconditional-text-line-removal.txt

A FEW USEFUL DETAILS

Common questions

Which settings produced this example?

Find text: apple; Matching lines: Remove matching lines; Match case: Off; Whole words only: Off.

What should I check before using the result?

This matches literal text rather than regular expressions. Filtering removes whole lines, not only the matching words.

Where is this text processed?

This text operation runs in your browser; its source and result are not sent for conversion. A draft may be kept in this browser tab when session storage is available. Clear removes the current draft; download important work before closing the tab.

YOUR TURN

Try Conditional Text Line Removal with your own text.

Use your own source and review the result before sharing.

Open Conditional Text Line Removal

Image detail

Language38

English العربية Français Italiano Deutsch Español Português Nederlands Русский Türkçe 日本語 中文 हिन्दी Bahasa Indonesia Bahasa Melayu 한국어 Tiếng Việt ไทย Polski Svenska Українська Norsk বাংলা Ελληνικά فارسی اردو Čeština Dansk Magyar Română Suomi Български Filipino ქართული Slovenčina Azərbaycanca עברית Slovenščina

Choose from 38 interface languages.