You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/cue/reference/remap/functions/replace.cue
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,14 @@ remap: functions: replace: {
5
5
description: """
6
6
Replaces all matching instances of `pattern` in `value`.
7
7
8
-
The `pattern` argument accepts regular expression capture groups. **Note**: Use `$$foo` instead of `$foo`, which is interpreted in a configuration file.
8
+
The `pattern` argument accepts regular expression capture groups.
9
+
10
+
**Note when using capture groups**:
11
+
- You will need to escape the `$` by using `$$` to avoid Vector interpreting it as an
12
+
[environment variable when loading configuration](/docs/reference/configuration/#escaping)
13
+
- If you want a literal `$` in the replacement pattern, you will also need to escape this
14
+
with `$$`. When combined with environment variable interpolation in config files this
15
+
means you will need to use `$$$$` to have a literal `$` in the replacement pattern.
0 commit comments