The following tooling should be reviewed before handling/manipulating strings in dotCMS. Methods: java.lang.String - StringsWebApi Useful Examples: String: Substring and Index of.. $VTLSERVLET_URI.substring(0, $VTLSERVLET_URI.indexOf('/',1)) $VTLSERVLET_URI.indexOf('/',1)) we start looking for / from the position 1 not including the character in 0 To replace certain matching characters in a String $string2=$string1.replaceAll("/", "//") - replaces all / with // Phone Formatter: $stringsapi.formatPhoneNumber('12:34-56789001')