We have confluence docs portal where we use the Scroll Viewport plugin. This plugin uses Velocity as a template language. I need to get, that highlighted, string from a URL. I already read this article on SO but it does not work for me. I tried it with using regex because I thought is the best solution.
www.servename.com/home/display/DOCMS/Tracking+Data+and+System+Errors
What I did so far:
#set($regex = "s/.*\/\/.*\/.*\/.*\/\(.*\)\/.*/\1/")
#set($url = $result.absoluteLink)
#set($spaceName = $url.replaceAll($regex, ""))
$spaceName