Replace
DataTarget independent
text.replaceReplace Old with New in the text. With "Replace all" on it replaces every occurrence, off only the first. Empty Old returns the text unchanged.
Example use
Replace an old separator with commas, optionally replacing every occurrence.
Node preview
Right-drag to pan and scroll to zoom. Expand inputs and edit parameters to see how ports change. This preview does not run the node; reopening the page restores the example.
Loading node preview…
Data inputs 4
- Text
textString The text this node reads, converts, searches or types.
Default availableDefault:""- Search text
oldString Text to replace; an empty value leaves the input unchanged.
Default availableDefault:""- Replacement
newString The replacement text.
Default availableDefault:""- All
allBoolean Replace all matches when enabled, or only the first match otherwise.
Default availableDefault:true
Data outputs 1
- Result
resultString The result of this data operation, with its type determined by the matching inputs.
Version and node identity
Version 1.0.0
sha256:eb777939bbaabf071e6603135db71728bda07d43cdb45162ff8b72ba244bc382