I'm trying to figure out how you globally replace forward slash / in a string to \/
Reason, trying to convert a string like this template/*.json into a regex friendly string like this: template\/(.*?).json to match strings.
Can't seem to figure out how to do it for strings.
A 'hacky' workaround was to do something like this: string.split('/').join('\\/') but there has to bee a prettier method to do it.