Handlebars Helpers
Find and Replace
Runs regular-expression find and replace during Handlebars substitution. Useful for cleaning text, normalizing values, and preparing messages or integration payloads.
Uses
- Use to replace a word in some text with another word
- Use to replace a word in some text with another word using a regular expression
Usage
Helper name : find_and_replace
TIP
Use regex101.com to test your regular expressions.
Examples
Simple Example
Example definition:
Replace apple with orange.
Substituted definition
Multiline usage
Add the regex flag m to enable multiline mode.
Substituted definition