Search and replace in strings

Use regular expression substitution functions to map paths, strip extraneous slashes, and more.


This is a companion discussion topic for the original entry at https://developer.fastly.com/solutions/examples/search-and-replace-in-strings