regex_replace(regex, value, replacement, once)
regex_replace(regex, value, replacement, once)
will try to parse value
using the regular expression regex
and replace with replacement
. once
indicates whether to replace only the first occurrence or all occurrences.
Superintendent follows Rust's regular expression syntax, which is heavily inspired by RE2.
#
Example 1returns:
replaced_all |
---|
000.000.0.0 |
#
Example 2returns:
replaced_first |
---|
092.168.0.1 |