#include <iostream>
#include <regex>
#include <string>
using namespace std;

int main() {
	regex e("1");
	string s = "1,";
	s.back() = '\0';
	
	cout << regex_match("1", e) << endl;
	cout << regex_match(s, e) << endl;
	
	return 0;
}