replace
Replaces characters that match a regular expression with another string.
Arguments
- Input string.
- Regular expression as a string.
- Replacement string.
- Optional: Boolean defining whether the function should replace only the first occurrence. The default value is false.
- Optional: Timeout in milliseconds as a long. The default value is 10000.
Examples
Expression | Result |
---|---|
replace("abc_123_456", "\d+", "000", true, 15000) | "abc_000_456" |