---
title: "Find text patterns in documents with regex | Docsi"
description: "Find emails, phone numbers and patterns in documents: exact text, keywords, wildcards or regex, with the page and the line around every match."
url: https://docsi.si/tools/find-patterns-in-documents/
updated: 2026-11-19
---

[Docsi](https://docsi.si/) / [Tools](https://docsi.si/tools/) / [Compare, search and classify](https://docsi.si/tools/#read)

# Find text patterns in documents with regex

Search a document for exact text, keywords, wildcards or regular expressions.

Search & AI

Up to 2 GB a file.

**Runs on**: Your device

**Files uploaded**: None

**Price**: Free

**Account**: Not needed

**Works offline**: Yes

**Updated**: 19 November 2026

Ctrl+F finds one word at a time. This tool takes a list of patterns and runs them all over a PDF, Word, PowerPoint, Excel or text file in one pass. Each pattern can be plain text, a set of keywords that must share a line, a wildcard such as “within * days”, or a regular expression for things with a shape, like email addresses or reference numbers. You get every match with its page number and the line it sits in, sorted page by page.

## How to find patterns

1. **Add your document above** Drop it on the box or choose it from your device. It is opened locally and is not uploaded.
2. **Set the options** Adjust patterns, or keep the defaults.
3. **Read the result** The findings appear on this page when the work is done, each pointing back to where it was found.

## When to use find text patterns in documents with regex

**Pulling every email address out of a file**: A supplier list, a membership register or a long email thread saved as PDF. One regular expression collects every address with the page it came from, so you are not copying them by hand.

**Checking a contract for the clauses you care about**: Add one row per clause: “termination”, “indemnity”, “auto-renew”. Give each a label and the results tell you which clause each hit belongs to, page by page.

**Finding numbers that follow a format**: Invoice numbers like INV-2026-0412, policy numbers or postcodes. A pattern finds every one, and a bare number that is only part of a longer one, such as a segment of a bill number, is skipped.

**Locating a phrase you half remember**: Use a wildcard: “payable within * days” finds the line whatever the number of days turned out to be.

## Tips for a better result

**Pick the right kind**: Exact finds the text as typed. Keywords needs every word on the same line, in any order. Wildcard treats * as any run of characters and ? as one character, within a line. Regex is for shapes, such as [A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,} for email addresses.

**Use Exclude to cut the noise**: Exclude drops a match when its line contains one of the words you list. Search for “termination” and exclude “convenience” to skip the termination-for-convenience clause and keep the rest.

**Turn on whole words for short terms**: Without it, “term” also matches “terminate” and “determined”. With it, only the word itself counts. Matching ignores capitals unless you switch Case sensitive on.

**Run OCR on scans first**: A scanned PDF is a picture of text, so there is nothing to match. Run Make a scanned PDF searchable, then search the result.

**Want ready-made patterns?**: Auto-highlight contracts and documents runs bundled lists of patterns for contracts, invoices, HR papers, research and personal data, color-coded by category.

## Options

**Pages**: Optional.

**Patterns**: Optional.

## What it costs and what it takes

Nothing. No account, no watermark, no trial and no daily limit.

- **Files up to 2 GB** As big as a browser tab can open. On a phone, past about 200 MB it may run out of memory; a computer copes better.
- **Up to 2,000 files at a time** They are worked through one after another, on your device.
- **Up to 20,000 pages a document** Long documents take longer, and nothing is uploaded while they do.

## Why it runs on your device

Contracts, payslips, IDs and invoices should not sit on somebody else's server. Docsi's engine is compiled to WebAssembly and runs inside your browser tab, so the file stays where it is, there is no upload wait, and the tool keeps working offline.

In the app you can also type what you want: “find”, “search”, “look for”, “where does it say”, “regex”.

## Questions

### How do I find all email addresses in a PDF?

Add a pattern, choose Regex as the kind and paste an email expression such as [A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}. Every address comes back with its page number and the line it was on.

### Which regular expression syntax does it use?

Rust's regex syntax, which is close to what most languages use: character classes, quantifiers, groups and alternation all work. Lookahead, lookbehind and backreferences are not supported, which keeps every search fast even on long documents.

### Can I search for several things at once?

Yes. Add as many patterns as you need. Each can have its own kind, case and whole-word setting, exclusions and a label, and all the matches come back together in page order.

### Why did it find nothing in my PDF?

Most often the PDF is a scan with no text layer. Run Make a scanned PDF searchable first. Otherwise check the kind: an Exact pattern with * in it looks for a literal asterisk, so switch it to Wildcard.

### Does it work on Word and Excel files?

Yes. It reads PDF, Word (.docx), PowerPoint (.pptx), Excel and OpenDocument files, plus plain text, CSV, Markdown, JSON and HTML. In a spreadsheet each sheet counts as a page.

### Are my files uploaded?

No. Find text patterns in documents with regex runs inside your browser using WebAssembly, so the file never leaves your device. You can turn off your internet connection after the page loads and it still works.

### Is it free?

Yes, with no watermark, no account and no limit on how often you use it.

### Does it work on a phone or tablet?

Yes, in any modern browser. Very large files are limited by the memory of the device, so a laptop handles them better than a phone.

## Related tools

[Apply Highlight Set Run a Highlight Set.](https://docsi.si/tools/auto-highlight-documents/)[Compare versions Compare two documents paragraph by paragraph using their layout.](https://docsi.si/tools/compare-pdf/)[Compare documents Show what changed between two documents.](https://docsi.si/tools/compare-documents/)[Identify document type Tell what kind of document this is.](https://docsi.si/tools/identify-document-type/)[Find similar documents Compare one document against others and find copies, earlier or later versions, excerpts and related files by their text.](https://docsi.si/tools/find-similar-documents/)[Search inside documents Find words or an exact "quoted phrase" inside many documents at once.](https://docsi.si/tools/search-inside-documents/)[Map document relationships Build a map of how documents relate.](https://docsi.si/tools/document-relationship-map/)[What is about to run out Look through documents for dates that mean an ending.](https://docsi.si/tools/contract-expiry-tracker/)

## Find patterns, and 153 more tools.

[See all tools](https://docsi.si/tools/)[Open the app](https://docsi.si/app/)
