#include <regex>
#include <exception>
#include <iostream>

int main(int argc, char *argv[])
{
  std::regex reg;
  try{
    reg = std::regex(".*[a-zA-Z]+.*");
  }
  catch(std::regex_error &e){
    std::cout << e.what() << std::endl;
    std::cout << e.code() << std::endl;
    if (e.code() == std::regex_constants::error_brack)
      std::cerr << "The expression contained mismatched brackets ([ and ]).\n";
  }
  return 0;
}