Replaces all occurrences of pattern, which may be a Perl-compatible regular expression, in input with replacement. If no matches are found, no replacements are made.

Once a replacement is made, substitutions continue from the end of the replaced buffer. Therefore, regsuball("aaa", "a", "aa") will return a string "aaaaaa" instead of recursing indefinitely.

This function may fail to make a replacement if the regular expression recurses too heavily. Such a situation may occur with lookahead and lookbehind assertions, or other recursing non-regular expressions. In this case, fastly.error is set to EREGRECUR.

This function is not prefixed with the std. namespace.


regsuball(STRING input, STRING pattern, STRING replacement)


set req.url = regsuball(req.url, "\+", "%2520");