public static boolean isPortWithProtocol(String portToCheck) {
        if (StringUtils.length(portToCheck) > PORT_SUFFIX_LENGTH && (StringUtils.endsWith(portToCheck, TCP_PORT_SUFFIX) || StringUtils.endsWith(portToCheck, UDP_PORT_SUFFIX))) {
            String port = StringUtils.left(portToCheck, portToCheck.length() - PORT_SUFFIX_LENGTH);
            return StringUtils.isNumeric(port);
        }
        return false;
    }
public static boolean isPortWithProtocol ( String portToCheck ) { if ( StringUtils . length ( portToCheck ) > PORT_SUFFIX_LENGTH && ( StringUtils . endsWith ( portToCheck , TCP_PORT_SUFFIX ) || StringUtils . endsWith ( portToCheck , UDP_PORT_SUFFIX ) ) ) { String port = StringUtils . left ( portToCheck , portToCheck . length ( ) - PORT_SUFFIX_LENGTH ) ; return StringUtils . isNumeric ( port ) ; } return false ; }
@return <code>true</code> if given value matching format 'number'/tcp or 'number'/udp