I might look into the split function but it would depend on more information. The split function returns a list of Strings breaking the given url string into parts based on the parameter–in this case the slash. The list of Strings starts at zero, so I think we want the 4th string but you can play with the number if it doesn’t produce the correct phrase.
myVar = url.split("/")
WebUI.comment('my var is ' + myVar)
Note: the contents within the split function is using Regex, so sometimes you have to “escape” the reference, like:
myVar = url.split("\\/")