Replacing a substring too broadly
A short literal can also occur inside longer identifiers. Enable whole-value boundaries or inspect every replacement count and output location.
Replace literal text or JavaScript regular-expression matches with explicit Unicode boundaries, capture tokens, multiline and dot-all flags, replacement escapes, exact counts, and a one-second browser Worker deadline.
Continue with a related workflow or open the next tool that usually follows this task.
Use a case converter to draft names, then treat every rename as a contract change: inventory consumers, define acronym rules, review invalid identifiers, compare a diff, and verify the destination.
OpenRelated toolCompare bounded text locally with exact line hunks, code-point highlights, and unified patch export.
OpenRelated toolTest bounded JavaScript regex in a worker with capture ranges, highlights, and a one-second timeout.
OpenRelated toolKeep first occurrences, compare case or trimmed keys, and optionally sort unique lines locally.
OpenKeep an untouched source copy and identify whether capitalization, boundaries, line endings, and dollar characters are meaningful.
Paste text or select a local text file within the displayed source limits.
Enter a find value and replacement; an empty replacement deletes accepted matches.
Choose Literal text for exact values or Regular expression for patterns, then set case and whole-value rules.
In regex mode, choose multiline, dot-all, and capture expansion explicitly; enable replacement escapes only for the documented sequences.
Run the Worker, inspect candidate, replacement, boundary, and zero-width diagnostics, compare the output, then copy or download it.
Update environment names, hostnames, paths, or labels while confirming exact replacement counts.
Rename standalone identifiers without changing longer names that merely contain the same substring.
Reorder dates, names, or log fields with numbered or named regex captures.
Insert line breaks or tabs through an explicit replacement escape policy instead of hidden editor behavior.
Replace private names or internal host labels with reviewed placeholders before sharing a minimal example.
A short literal can also occur inside longer identifiers. Enable whole-value boundaries or inspect every replacement count and output location.
Dots, brackets, parentheses, and backslashes are syntax in regex mode. Use Literal text when the find value should have no pattern meaning.
Capture expansion interprets $1, $<name>, $&, and $$. Turn it off when those characters must be inserted literally.
^ and $ are whole-input anchors until Multiline anchors is enabled, while dot excludes line endings until Dot matches newlines is enabled.
Zero-width patterns insert text without consuming source characters. Review the warning and output size before using lookarounds or anchors for insertion.
Literal, case-sensitive whole-value matching changes standalone cat but leaves category and underscored identifiers intact.
cat category _cat cat_ catanimal category _cat cat_ animalRegex capture expansion swaps comma-separated names with named groups while preserving each line ending.
Doe, Jane
Kim, MinJane Doe
Min KimLiteral mode escapes the find value before constructing a global Unicode RegExp, so pattern metacharacters and replacement dollar tokens have no special meaning.
Regex mode always uses global and Unicode flags. Ignore-case, multiline anchors, and dot-all are added only when their visible controls are selected.
Whole-value filtering examines the Unicode code point on either side of each complete match and rejects adjacency to letters, numbers, combining marks, or underscore.
Optional capture expansion supports numbered groups, named groups, the whole match, and a literal dollar. Optional replacement escapes support only newline, carriage return, tab, and backslash.
Zero-width matches advance by one Unicode code point after evaluation. Accepted matches are rebuilt from untouched source slices, so line endings and nonmatched Unicode remain exact.
Input, setting, candidate, replacement, and output limits are enforced before or during O(n+m) reconstruction. Processing runs in a one-second module Worker and emits only numeric and option analytics.
Literal mode escapes every regex metacharacter and inserts replacement dollars literally. Regex mode executes a JavaScript pattern with global and Unicode flags plus the selected case, multiline, and dot-all flags.
It rejects a candidate when the source character immediately before or after the complete match is a Unicode letter, number, combining mark, or underscore. It is more multilingual than ASCII \b but is still a documented code-point rule, not language-specific segmentation.
When capture expansion is enabled in regex mode, $1 through $99 use numbered groups, $<name> uses a named group, $& inserts the whole match, and $$ inserts one dollar sign.
Enable replacement escapes to convert \n, \r, \t, and \\. Any other backslash escape is rejected instead of guessed.
Yes. A lookahead or anchor can match without consuming text. The engine advances by a Unicode code point to prevent an infinite loop and reports the number of accepted zero-width matches.
No normalization or line-ending conversion is applied. Unmatched source slices remain exact; only accepted matches are replaced with the processed replacement value.
Source text is limited to 1,048,576 UTF-8 bytes and 200,000 lines, find values to 16,384 bytes, replacements to 65,536 bytes, candidates to 50,000, and output to 2,097,152 bytes. A browser Worker stops after one second and analytics receives counts and options, not text.
Maintained and tested by SimpleWebUtilsReviewed
Method: Verification started with the guide's “Swap comma-separated names with named captures” fixture in Find and Replace Text. The run followed “Freeze and classify the source” through “Set flags and replacement semantics explicitly”, compared the produced result to the documented expectation, and checked the distinct limits behind “Using regex for a literal value” and “Trusting ASCII word boundaries for multilingual text”.
Expected result: The named-capture replacement changed exactly two comma-form names to Jane Doe and Min Kim, reported two candidates and two replacements, and preserved CRLF output.
Open the tested workflowUse these focused guides when you need a practical workflow before opening the tool.
Use a case converter to draft names, then treat every rename as a contract change: inventory consumers, define acronym rules, review invalid identifiers, compare a diff, and verify the destination.
Workflow guideA multiline regex review needs the original line structure, a known pattern representation, deliberate flags, exact match and capture ranges, and a failing near-match. Run the native expression in an isolated worker, interpret offsets as UTF-16, and verify the final pattern again in the destination runtime before replacement or deployment.
Workflow guideRegex escaping is layered. First identify the source representation, decode only that representation, write the intended raw pattern body, and test it against exact positive and negative text. Then encode the verified body once for the destination JavaScript, JSON, or configuration format instead of adding backslashes by trial and error.
Workflow guideA practical workflow for turning repeated one-item-per-line data into an auditable unique list while preserving the first useful occurrence.
Workflow guideA review-first workflow for producing a unique, naturally ordered list of IDs, names, URLs, tags, or labels without confusing sorting with normalization.
Workflow guideA reviewable workflow for cleaning empty and whitespace-only rows while preserving the structure, order, and line-ending details that still matter.
Workflow guideUse this workflow when code viewers, PDFs, transcripts, legal documents, or exported notes add numbers at the start of copied lines. Keep the source, distinguish marked numbering from ambiguous plain integers, compare cleanup evidence, and validate the result before reuse.
Workflow guideUse the explicit Plain gutter format when an IDE, PDF, or documentation viewer copied a leading integer before every stack-trace line. Compare the result with the raw trace, preserve diagnostic values, redact secrets, and only then share it.
Workflow guideText cleanup is safest when it is treated as a sequence of explicit, reversible transformations. Preserve the source, identify line and delimiter boundaries, make one structural change at a time, promote only reviewed output to the next step, and compare the final text with the destination contract before publishing, importing, or sharing it.
Workflow guideA safe bulk-replacement workflow starts with an untouched source and the narrowest matching rule. It proves patterns separately, makes every flag and dollar token explicit, reviews boundary and zero-width diagnostics, compares the exact output, and tests the destination instead of treating a replacement count as correctness.
Workflow guideUse this workflow for a plain list copied from a spreadsheet, report, log, or editor when every row needs the same label, marker, wrapper, or delimiter. It keeps line boundaries exact and separates bulk text insertion from JSON, CSV, SQL, shell, or HTML validation.
Continue with another maintained workflow
Compare bounded text locally with exact line hunks, code-point highlights, and unified patch export.
Test bounded JavaScript regex in a worker with capture ranges, highlights, and a one-second timeout.
Keep first occurrences, compare case or trimmed keys, and optionally sort unique lines locally.
Remove every blank row or collapse repeated gaps, with exact counts and line-ending diagnostics.
Remove line-start numbering while preserving inline values, indentation, and exact line endings.