# replace

Replaces characters that match a regular expression with another string.

## Arguments

1. Input string.
2. Regular expression as a string.
3. Replacement string.
4. Optional: Boolean defining whether the function should replace only the first occurrence. The default value is false.
5. 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" |