Replace
DataTools
Description
Replace text in the blink of an eye! Replace swaps strings for other content - simple, fast and reliable. Ideal for text cleanup, data standardization and bulk updates in documents, configurations and code.
With options for replacing all or only the first occurrence, case sensitivity and multiline support, you stay in full control. Clean up thousands of lines consistently and without errors!
Why This Tool Stands Out
- Bulk Replacement across thousands of lines
- Consistent Results - no fatigue errors
- Case Sensitivity optional
- All or First - full flexibility
Perfect for:
Content managers, developers, technical writers and everyone who needs to clean up or standardize text. Ideal for configuration changes, template updates, data migrations and content normalization. Perfect for CMS updates, API migrations, documentation and code refactoring!
Workflow support; time savings depend on the task
Instead of searching for and replacing every occurrence manually, Replace performs bulk replacements in seconds - with guaranteed consistency and no missed spots or typos!
JSON Parameters
- text REQUIRED (String)The text to perform the replacement in.
- search REQUIRED (String)The string to search for and replace.
- replacement REQUIRED (String)The text to insert in place of the string found.
- replaceAll OPTIONAL (Boolean)Whether all occurrences should be replaced (true) or only the first (false). Default: true
- caseSensitive OPTIONAL (Boolean)Whether the search should be case-sensitive. Default: true
Example Call
{
"tool": "Replace",
"params": {
"text": "The old server is old. We need a new server.",
"search": "old",
"replacement": "new",
"replaceAll": true,
"caseSensitive": false
}
}
Example Usage
Load the text to update - a document, code or configuration.
Enter the text to search for and the replacement text. Choose whether all occurrences or only the first should be replaced.
Save the updated text or use it directly in your application.
Return Values
The tool returns an object with the following properties:
- result (String)
The text after the replacement - replacementsMade (Integer)
Number of replacements performed - originalLength (Integer)
Length of the original text - newLength (Integer)
Length of the resulting text - success (Boolean)
True if the operation was successful - error (String, optional)
Error message if the operation failed
Related DataTools
Ready for More DataTools?
Discover all our data processing tools for efficient text transformations.
Explore All DataTools