Line Filter & Copy

Extract text fragments by keyword.

grep, but you also keep only the half of the line you actually want.

Filter a text file down to just the lines that contain a keyword, and keep only the portion of each line you care about. The other half — before or after the keyword — gets dropped.

What it does

You give it a text file and a search string. It walks every line. Any line that doesn't contain the search string is discarded. From the lines that match, you keep either the part before the keyword or the part after it — not both. The result goes to Output.txt in the same folder.

Example

Suppose your input file has lines like:

John_Melencamp@Yahoo.com http://www.melencamp.com
Jane_Doe@Gmail.com http://www.example.com
Bob (no website)

Search for http://www, keep the part before the keyword, and you get a clean list of emails:

John_Melencamp@Yahoo.com
Jane_Doe@Gmail.com

Bob's line is discarded because it doesn't contain the keyword.

Features

  • Filter by keyword and trim around it in a single pass
  • Choose to keep the text before or after the keyword
  • Output written to a separate file — input stays untouched
  • Portable, no installer

System requirements

  • Windows 7, 8, 10, 11
  • A few MB of free RAM
  • Under 1 MB of disk space

Browse the full catalog

49 small, sharp Windows utilities. All freeware. All by the same author.