所以有這樣的代碼來過濾字母,而/ ".:=
如何允許-
?正則表達式字符串過濾 - 如何讓`-`符號?
#include <boost/regex.hpp>
#include <boost/algorithm/string/regex.hpp>
std::string filter_args(std::string args)
{
std::cout << boost::erase_all_regex_copy(args, boost::regex("[^a-zA-Z0-9=\"/.: ]+"));
return boost::erase_all_regex_copy(args, boost::regex("[^a-zA-Z0-9=\"/.: ]+"));
}
在內存位置0x003ef0a4處出現'boost :: exception_detail :: clone_impl失敗..' –
Rella
@Kambumbus - 再試一次。 –
如果你把它放在正確的地方,你根本不需要逃避它。 –