Text Tools

Find & Replace

Articles, guides, and in-depth tips for the Find & Replace — everything you need to get the most out of it.

✦ 8 Articles ✦ Updated Weekly ✦ Free to Read
✦ AI

✦ AI-powered — understands natural language

Text Tools Sep 11, 2026 Latest ✦

Word Boundaries and Lookarounds: Precise Find & Replace

Replacing "id" also hits valid, hidden and width. Word boundaries, lookarounds and lazy quantifiers are the three patterns that make find-and-replace precise.

Read article
Text Tools Jun 27, 2026

Why sed's s/old/new/g Fails With File Paths — Delimiters, Capture Groups, and the GNU vs BSD sed Difference

sed's `s/old/new/g` fails when patterns contain forward slashes (like file paths) — but any character can be the delimiter: `s|/usr/local|/usr/share|g` works identically. Here's the complete sed substitution syntax including & for matched content and \1 capture groups, the -i in-place editing difference between GNU sed (Linux) and BSD sed (macOS), and why grep-first-then-sed is the workflow that prevents data loss.

Text Tools Jun 23, 2026

Regex Works on Characters, Not Structure — Why It Fails on CSV, HTML, and JSON (and What to Use Instead)

Regex operates on characters, not structure — and applying it to CSV, JSON, or HTML routinely produces wrong results because the same pattern can appear in both structural positions (delimiters, field names) and content positions (inside field values). Here's why commas inside quoted CSV fields confuse naive regex, the HTML-parsing-with-regex problem, when regex on structured text is actually acceptable (log files, single-field formats), and the correct parsers for each format.

Text Tools Jun 17, 2026

Find & Replace Beyond Basics: Regex Capture Groups, Multi-Cursor Editing, and Safe Project-Wide Replace

Find-and-replace with regex capture groups doesn't just substitute text — it can restructure it, swapping argument order or reformatting dates by reusing captured values in the replacement. Here's how capture-group replacements work, when multi-cursor editing is the better tool instead, case-modification syntax for naming-convention conversions, and safe practices for project-wide replace operations.

Text Tools Jun 14, 2026

Catastrophic Backtracking: Why a Regex That Works Instantly in Testing Can Hang Forever on Real Data

A find-and-replace that works instantly on a 100-character test string can take minutes (or never finish) on a 10,000-character real document — not because the engine is slow, but because certain regex patterns cause processing time to grow exponentially with input length. Here's how "catastrophic backtracking" works with patterns like (a+)+b, why it's invisible on short test inputs, why it's also a recognized security vulnerability (ReDoS), and how to recognize vulnerable pattern structures.

Text Tools Jun 10, 2026

Automating Text Transformations in Spreadsheets: SUBSTITUTE, REGEXREPLACE, and Bulk Editing

Excel and Google Sheets have SUBSTITUTE, REGEXREPLACE, PROPER, and TRIM functions that automate text transformation across thousands of cells. Here's chained SUBSTITUTE formulas, REGEXREPLACE for phone number formatting and HTML stripping, and practical workflows for cleaning product exports and generating URL slugs.

Text Tools Jun 9, 2026

Regex for Data Cleaning: Practical Patterns for Messy Real-World Data

Real-world data — phone numbers, dates, emails, log entries, product codes — arrives inconsistently. Here are the regex patterns for the most common data cleaning tasks: phone normalisation, date standardisation, HTML stripping, whitespace cleaning, and log redaction.

Text Tools Jun 6, 2026

Find & Replace — Text Substitution with Regex, Case Options & More

Learn how find and replace works beyond basic text substitution — regex patterns, whole word matching, case sensitivity, backreferences — with real examples for data cleaning, templates, and code refactoring.