Sentence Remover

Splits text into sentences and drops any sentence whose text contains the keyword you specify, case-insensitively, keeping the rest of the passage intact and rejoined into readable text. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-23

Overview

Introduction

Sometimes an entire sentence needs to go, not just a word, because it references something outdated, off-topic, or sensitive, and finding every such sentence by hand in a long passage is tedious.

This tool runs entirely client-side, so nothing you paste is ever uploaded to a server.

What Is Sentence Remover?

A sentence remover that splits text into sentences and filters out any sentence whose text contains a given keyword, case-insensitively, then rejoins the remaining sentences.

It's distinct from a word remover, which deletes individual word matches; this tool removes the entire sentence a match appears in.

How Sentence Remover Works

The tool matches sentence-ending punctuation followed by whitespace or end-of-string to split the input into an array of trimmed sentences.

It then keeps only the sentences whose lowercased text doesn't contain the lowercased keyword, and joins the survivors back together with single spaces.

When To Use Sentence Remover

Use it to strip out every sentence mentioning a discontinued product, an outdated date, or a name you want scrubbed from a document before sharing it.

It's a fast way to get the answer without opening a code editor, a REPL, or writing a one-off script just to check.

Features

Advantages

  • Removes whole sentences in one pass instead of requiring manual scanning.
  • Case-insensitive substring matching catches variations in capitalization automatically.

Limitations

  • Sentence detection relies on `.`, `!`, and `?`; abbreviations or decimal numbers can be misread as sentence boundaries.
  • Substring matching means a keyword can match inside a longer, unrelated word.

Examples

Removing sentences containing a keyword

Input

This sentence is fine. This one mentions apple pie. Another normal sentence.

Output

This sentence is fine. Another normal sentence.

The sentence containing "apple" is dropped; the other two sentences are kept and rejoined.

Best Practices & Notes

Best Practices

  • Use a specific enough keyword to avoid accidentally matching unrelated sentences that happen to contain the same substring.
  • Review the result afterward for abbreviations that may have split sentences incorrectly.

Developer Notes

Sentences are matched with `/[^.!?]*[.!?]+(?=\s|$)|[^.!?]+$/g`, then filtered with `sentences.filter((s) => !s.toLowerCase().includes(keyword.toLowerCase()))` before being rejoined with single spaces.

Sentence Remover Use Cases

  • Scrubbing sentences that mention a specific name, product, or date from a document
  • Filtering out off-topic sentences before publishing a passage
  • Cleaning training or sample text of sentences containing a flagged term

Common Mistakes

  • Using a very short or common keyword that ends up matching far more sentences than intended.
  • Assuming this does whole-word matching; it's a substring match, so partial word matches count too.

Tips

  • Combine with a word remover tool if you only need to strip a term rather than an entire sentence.

References

Frequently Asked Questions