C++判斷是否爲有效IP地址

std::string ip("199.199.199.199"); std::regex check_ip("(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[1-9])[.](25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[1-9])[.](25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]
相關文章
相關標籤/搜索