Skip to content
Utilerio
All endpoints

Find and Replace

POST/api/v1/tools/find-replace

Find and replace text with plain matching or a regular expression, with a live match count.

Authentication

Requires an API key in the X-API-Key header.

Try it

POST/api/v1/tools/find-replace

Parameters

textstringrequired

Text to search within.

findstringrequired

Text or regex pattern to find.

replaceWithstringoptional

Replacement text. Default empty.

useRegexbooleanoptional

Treat find as a regular expression.

caseSensitivebooleanoptional

Case-sensitive match. Default true.

allbooleanoptional

Replace all matches, not just the first. Default true.

Request body

{
  "text": "hello world",
  "find": "world",
  "replaceWith": "there"
}

Response codes

  • 200Success.
  • 400Invalid request — check your body or parameters.
  • 401Missing or invalid API key.
  • 403The API key is not scoped to this endpoint.
  • 429Rate limit exceeded — retry after a short wait.

Language

cURL

Request

curl -X POST https://utilerio.com/api/v1/tools/find-replace \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"hello world","find":"world","replaceWith":"there"}'

Response

{ "output": "hello there", "count": 1 }