public static boolean isValidIpPort(@NotNull final String portStr) {
        return ipPortPattern.matcher(StringUtils.strip(portStr)).matches();
    }
public static boolean isValidIpPort ( @ NotNull final String portStr ) { return ipPortPattern . matcher ( StringUtils . strip ( portStr ) ) . matches ( ) ; }
Given an ip port string, it checks if it's a valid ip port with a regex (see ipPortPattern attribute)

@param portStr the string to check if it's a valid ip port
@return true if it's a valid ip port, false otherwise