    #include <iostream>
    #include <regex>
    #include <string>

    int main()
    {
        std::basic_string<char> reg = "^\\w";

        try
        {
            std::basic_regex<char> tagRegex(reg);
        }
        catch(std::exception &e)
        {
            std::cout << e.what() << std::endl;
        }

        return 0;
    }