When we create the regex which has a forward slash, then we need to put a backslash before forward-slash since the forward slash is the unescaped delimiter. For example, if I want my regex to match /content/att, then I need to put regex like this
/content\/att. And this works too.
But when we add the dispatcher rule in AEM to allow a url path, the backslash is not needed for the unescaped delimiter. I would appreciate is someone can help me understand this, I mean why we need the backslash when we write the regex, but not when using the same regex in the url path of the dispatcher rule.
In dispatcher, look at the url path – there is no backslash before /att
/type "allow"
/url "/content/att"
/extension '(gif)'
}