Docs edit, noted double backslash requirement for some regex operators (#1361)

This commit is contained in:
rv3r authored and GitHub committed 2022-04-04 10:26:06 +02:00
1 parent 5e9b391ac4
commit 9a804d546c
1 file changed
+3 -2
+3 -2
View File
@@ -205,10 +205,11 @@ title('aBc') => 'Abc'
### `replace(string, regex, repl?); replace_first(string, regex, repl?)`
Replaces all, or first occurence of a regular expression in the string with `repl` expression,
or nothing, if not specified
or nothing, if not specified. To use escape characters (`\(`,`\+`,...), metacharacters (`\d`,`\w`,...), or position anchors (`\b`,`\z`,...) in your regular expression, use two backslashes.
<pre>
replace('abbccddebfg','b+','z') // => azccddezfg
replace('abbccddebfg','\\w$','z') // => abbccddebfz
replace_first('abbccddebfg','b+','z') // => azccddebfg
</pre>
@@ -428,4 +429,4 @@ not present, and default expression is provided, sets a new value to be associat
### `system_variable_set(key, new_value)`
Returns the variable from the system shared key-value storage keyed with a `key` value, and sets a new
mapping for the key
mapping for the key