⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 res.cpp

📁 Boost 库写的备份软件
💻 CPP
字号:
#include <iostream>
#include <fstream>
#include <string>
#include <boost/filesystem.hpp>
#include <boost/regex.hpp>
using namespace std;
using namespace boost::filesystem;
using namespace boost;
/*
bool	match(char * _to,regex&	reg,string& msg){
	smatch	what;
	string	text(_to);
	if(regex_match(text,what,reg,boost::match_extra)){

		unsigned i, j;
		std::cout << "** Match found **\n   Sub-Expressions:\n";
		for(i = 0; i < what.size(); ++i)
			std::cout << "      $" << i << " = \"" << what[i] << "\"\n";
		std::cout << "   Captures:\n";
		for(i = 0; i < what.size(); ++i)
		{
			std::cout << "      $" << i << " = {";
			for(j = 0; j < what.m_subs[i].captures(i).size(); ++j)
			{
				if(j)
					std::cout << ", ";
				else
					std::cout << " ";
				std::cout << "\"" << what.captures(i)[j] << "\"";
			}
			std::cout << " }\n";
		}
	}
	else
	{
		std::cout << "** No Match found **\n";
	}

}
return	true;
}
*/

bool	match(string src){
	size_t	pos	=	8;
	for(string::iterator	srbe	=	src.rbegin();srbe!=src.rend();srbe--){
		if(!pos--)
			break;
		if(!::isdigit(*srbe))
			return	false;

	}

	return	true;
}
int	main(int	argc,char **argv){
	//string	reg("(\\w*)(\\.\\d{8}$)");
	//regex	regx(reg);
	//string	msg;
	//match("asdf.20080102",regx,msg);
	return	0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -