Text Tools

Find and Replace Text

Live

Preview and apply literal or regular-expression replacements.

About Find and Replace Text

Preview and apply literal or regular-expression replacements. Enter source text, find, replace with, match mode, case sensitivity in a purpose-built find replace interface designed for this subject. Literal mode escapes the search text; regex mode compiles the entered JavaScript regular expression without evaluating code. The result includes replaced text, replacements, source length, result length, supporting detail, and clear units or diagnostics. Results depend on the entered assumptions and rounding. Check important decisions against the original records or an authoritative source. Processing stays in your browser, and UtilityPages does not store the values you enter.

Set up Find and Replace Text

Workspace

Source workbench

Edit the source fields below and inspect the rendered output alongside your work.

This workspace updates as you edit.

Enter source text for this calculation.

Enter find for this calculation.

Enter replace with for this calculation.

Enter match mode for this calculation.

Enter case sensitivity for this calculation.

Find and Replace Text result

Enter the values above, then replace text to see a detailed result.

How Find and Replace Text works

Literal mode escapes the search text; regex mode compiles the entered JavaScript regular expression without evaluating code.

How it works

Literal mode escapes the search text; regex mode compiles the entered JavaScript regular expression without evaluating code. Results depend on the entered assumptions and rounding. Check important decisions against the original records or an authoritative source.

Examples

Find and Replace Text worked example

Example input
{
    "source": "UtilityPages tools are fast. UtilityPages tools run locally.",
    "find": "UtilityPages",
    "replacement": "Our utility site",
    "mode": "literal",
    "case_sensitive": "yes"
}
Expected result
{
    "result": "Our utility site tools are fast. Our utility site tools run locally.",
    "replacement_count": 2,
    "source_length": 60,
    "result_length": 68
}

Privacy

This tool does not store your inputs or results on UtilityPages.org.

Frequently asked questions

How does the Find and Replace Text work?

Literal mode escapes the search text; regex mode compiles the entered JavaScript regular expression without evaluating code.

What information should I enter?

Enter source text, find, replace with, match mode, case sensitivity. Use values and units from the same scenario so the result is internally consistent.

What results does this tool provide?

It reports replaced text, replacements, source length, result length, including intermediate context where it helps you review the answer.

What limitations should I know about?

Results depend on the entered assumptions and rounding. Check important decisions against the original records or an authoritative source.