Use ACS Commons' `PathInfoUtil` [1] to get the selector in a safer manner, or atleast Slings built in selector resolver:  `request.getRequestPathInfo().getSelectors()` - no sense in re-parsing yourself.

http://adobe-consulting-services.github.io/acs-aem-commons/apidocs/com/adobe/acs/commons/util/PathInfoUtil.html