Find and Replace
Table of Contents
- How to use
- Key features
- Common use cases
- Examples — grouped (copy-paste ready)
- Simple replaces
- Regex examples
- Substitution groups / backreferences
- More regex examples (advanced)
- Tips for using regex safely and effectively
- Dedicated PicoToolkit converters — prefer these over ad-hoc regex when possible
- Tips & edge cases
- Short FAQ
- Related tools
A Powerful Online Solution for Search & Replace
Find and replace text online — fast and fully in your browser. The tool supports regular expressions, replacement groups ($1, $2), and a Match Case option. Use Modify → Find & Replace and click the Replace button to replace all occurrences. Processing is client-side; limits are driven only by your browser/textarea capacity.
How to use
- Paste your text into the editor.
- Open Modify → Find & Replace.
- Enter the Find pattern and the Replace text. Toggle Match Case or Use Regular Expression.
- Click the Replace button (performs replace on all matches). Review or undo as needed.
- If you process very large text, work in smaller chunks to avoid browser slowdowns.
Key features
- Simple string replace — quick bulk edits across a document.
- Regex support for advanced pattern matching.
- Replacement groups / backreferences using
$1,$2, … - Match Case toggle for case-sensitive replacements.
- Client-side processing — your text stays in the browser (no upload).
- Replace action targets all matches (button labeled Replace).
- Menu location: Modify → Find & Replace.
Common use cases
- Bulk edits: update product names, company terms, or legal wording across many documents.
- Data cleanup: normalize separators, unify quotes, or prepare CSVs before analysis.
- Code & logs: rename variables, update paths/URLs, or change prefixes/suffixes.
- SEO/content updates: replace keywords or tidy meta snippets.
- Markup fixes: remove or change attributes — consider using HTML Stripper first if you need to ignore tags.
Examples — grouped (copy-paste ready)
Simple replaces
- Find:
apple→ Replace:orange - Find (case-sensitive):
Apple→ Replace:Pear(toggle Match Case) - Replace all occurrences of double spaces: Find:
→ Replace:
Regex examples
Text: I have an apple and a pineapple.
Find: \bapple\b
Replace: orange
Result: I have an orange and a pineapple.
Text: prelude prepare preview
Find: ^pre\w*
Replace: new-
Result: new- new- new-
Text: I am running and swimming today.
Find: \w+ing\b
Replace: REPLACED
Result: I am REPLACED and REPLACED today.
Text: 2021-09-30 is the date.
Find: (\d{4})-(\d{2})-(\d{2})
Replace: $2/$3/$1
Result: 09/30/2021 is the date.
Text: Hello world
Find: <[^>]+>
Replace:
Result: Hello world
Text: apple banana cherry
Find: \s+
Replace: ,
Result: apple,banana,cherry
Substitution groups / backreferences
Text: hello world
Find: (\w+)\s+(\w+)
Replace: $2 $1
Result: world hello
Text: part-old test-old
Find: (\w+)-old
Replace: $1-new
Result: part-new test-new
Text: ID-123 ID-456
Find: ID-(\d+)
Replace: user-$1
Result: user-123 user-456
More regex examples (advanced)
Text: foo foo foo bar bar
Find: (\w+)(\s+\1)+
Replace: $1
Result: foo bar
Text: item_123 product_456
Find: ([A-Za-z]+)_(\d+)
Replace: $1-$2
Result: item-123 product-456
Text: Version 1.2.3
Find: Version(?:\s+)?(\d+(?:.\d+)*)
Replace: v$1
Result: v1.2.3
Tips for using regex safely and effectively
- Test on a small sample first. Because Replace acts on all matches, verify results before you commit.
- Use
\bto anchor whole-word matches and avoid partial replacements (e.g.,\bcat\bwon’t matchcatalog). - Remember replacements use
$1,$2, … for backreferences (not\1in the replacement field). - For case-sensitive patterns combine Match Case with regex or use inline flags if needed — but prefer the Match Case toggle when available.
- Escape special characters in literal searches (e.g., search for a dot use
.). - If your input contains HTML or structured data, prefer dedicated converters (see next section) because regex can be error-prone with nested structures.
- For very large documents split the text into parts; browsers may slow or run out of memory for extremely large inputs.
Dedicated PicoToolkit converters — prefer these over ad-hoc regex when possible
When the goal is format conversion rather than ad-hoc string edits, use dedicated tools below — they handle edge cases reliably and simplify the workflow.
- Convert Newline To Comma — turn multiline lists into CSV safely.
- HTML Stripper — remove HTML tags without breaking nested markup.
- CSV to JSON Converter — structured conversion of CSV to JSON.
- JSON to CSV Converter — reliable JSON → CSV conversion.
- Remove Non-Alphanumeric Characters — safer than multiple regex passes.
- Convert Tabs — normalize tab characters before replacements.
Advice: use those converters when working with CSV/JSON/HTML or when you need predictable results across many edge cases. Regex is powerful, but dedicated tools reduce mistakes and save time.
Tips & edge cases
- Make a copy of your text before mass changes. Use undo if the editor offers it.
- To avoid accidental global edits, run a Find first (inspect matches) before Replace.
- When replacing quotes, handle smart quotes and straight quotes separately.
- If replacements create duplicate lines, use Remove Duplicates afterwards.
- Trim or normalize whitespace with Remove Spaces or Remove Empty Lines where appropriate.
Short FAQ
- Q: Does the tool support regex backreferences in replacements?
- A: Yes — use
$1,$2, etc. in the replacement field to reference capture groups from your pattern. - Q: Is processing client-side or uploaded?
- A: Processing is client-side — your text stays in the browser. There is no server upload.
- Q: Are there file or character limits?
- A: No hard limit. Limits depend on what your browser and device can handle inside a textarea.
- Q: How do I make case-sensitive replacements?
- A: Toggle the Match Case option. For regex you can also craft patterns to be case-specific.
- Q: Does Replace change every match or one at a time?
- A: The tool performs Replace for all matches when you click the Replace button.
Related tools
- Line Counter — count lines before/after edits.
- Word Counter — verify word counts after mass changes.
- Character Counter — check size impact of replacements.
- Minify Text — remove unnecessary whitespace and reduce size.