Find and replace
Replace every occurrence of a word or phrase in text, exactly as typed, with a count of the changes.
Input
Result
Fill in the input and press Run.
Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.
Use it from code or an agent
curl -s https://setget.net/v1/tools/find-replace \
-H 'Content-Type: application/json' \
-d '{"input":{"text":"Cat, concat, cat.","find":"cat","replace":"dog","case_sensitive":false,"whole_word":true}}'
import json, urllib.request
body = {'input': {'text': 'Cat, concat, cat.', 'find': 'cat', 'replace': 'dog', 'case_sensitive': False, 'whole_word': True}}
request = urllib.request.Request("https://setget.net/v1/tools/find-replace", json.dumps(body).encode(),
{"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/find-replace", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"input":{"text":"Cat, concat, cat.","find":"cat","replace":"dog","case_sensitive":false,"whole_word":true}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
"slug": "find-replace",
"input": {
"text": "Cat, concat, cat.",
"find": "cat",
"replace": "dog",
"case_sensitive": false,
"whole_word": true
}
}
{
"input": {
"text": "Cat, concat, cat.",
"find": "cat",
"replace": "dog",
"case_sensitive": false,
"whole_word": true
}
}
Endpoint: POST /v1/tools/find-replace. Over MCP: run_tool with slug: "find-replace".
Machine-readable: input schema, Markdown. Connect an agent.
Inputs
| Name | Type | Required | What it does |
|---|---|---|---|
text |
string | yes | The text to change. |
find |
string | yes | The exact text to look for. No special characters. |
replace |
string | no | The text to put in its place. Leave empty to delete. Default: "". |
case_sensitive |
boolean | no | Treat upper and lower case as different. Default: true. |
whole_word |
boolean | no | Only match when the text is not part of a longer word. Default: false. |
Examples
Input
{
"text": "Cat, concat, cat.",
"find": "cat",
"replace": "dog",
"case_sensitive": false,
"whole_word": true
}Result
{
"text": "dog, concat, dog.",
"count": 2
}Special characters are plain text
Input
{
"text": "price: $5.00 (was $7.00)",
"find": "$",
"replace": "USD "
}Result
{
"text": "price: USD 5.00 (was USD 7.00)",
"count": 2
}Questions
- Can I use wildcards or patterns?
- Not here. Every character is matched exactly as typed. Use the regex replace tool for patterns.
Related tools
- Regex replaceReplace every match of a regular expression, with backreferences such as \1 in the replacement.
regex-replace - Case converterConvert text between lower, UPPER, Title, Sentence, camelCase, PascalCase, snake_case, kebab-case and more.
case-convert - Remove duplicate linesRemove repeated lines from text, keeping the first occurrence of each and the original order.
dedupe-lines - Apply a patchApply a unified diff to a text and get the patched result, with clear errors when a hunk does not fit.
patch-apply - Escape and unescape textEscape or unescape text for HTML, URLs, JSON strings, shell commands, regular expressions and CSV fields.
escape-unescape - Extract emails and URLsPull every email address and web link out of a text, and optionally IPv4 addresses and hashtags.
extract-emails-urls