I am currently trying to develop a custom client template for the Google Tag Manager Server Side and would like to react to a certain URL pattern. Unfortunately, I'm either being silly with the regex or there is somehow a problem with the sandbox JS. I have simplified the example. There is a problem with the backslash at the beginning. Here is the code and the error message. Does anyone have an idea?
const claimRequest = require('claimRequest');
let text = "/abc";
let pattern = /\/ab[c]/;
let result = pattern.test(text);
claimRequest();
And the error message:
1 Error(s) parsing the input:
token recognition error at: '\'
Offending token '' at 4,15.