#include <iostream>
#include <regex>
#include <vector>

int main() {
	std::regex rx(R"(^([+-]?(?:[[:d:]]+\.?|[[:d:]]*\.[[:d:]]+))(?:[Ee][+-]?[[:d:]]+)?$)");
	std::vector<std::string> v({{
		"1", "0", "10",
		"1000.1", "+1",
		"+10", "-10", "1.",
		".1", "1.1", "+1.",
		"-1.", "+.1", "-.1",
		"009", "+009", "-009",
		"-01e0", "+01E0", "+1e-1",
		"+1e+1", "+1.e1", "1E1",
		"1E+1", "0.001e-12", "0.111111111111111", 
		".", "1a", "++1",
		"+-1", "+", "-.",
		"-", "--1.", "1.e.1",
		"1e.1", "0+.e0"
	}});
	for (int i = 0; i < v.size(); ++i) {
		std::cout << (std::regex_match(v[i], rx) ? "matched: " : "not matched: ")
			<< v[i] << std::endl; 
	}
	
    // std::regex rx2(R"(^[[:alpha:]][[:alnum:]]*$)");
    // std::string s("ыwwe3");
    // if (std::regex_match(s, rx2)) {
    //     std::cout << "var object matched\n";
    // }
	return 0;
}