title: Can you prevent std::regex from throwing exception on invalid expressions?
body: <pre><code>std::regex regex("*", std::regex_constants::icase);
  </code></pre>
  
  <p>This will throw an exception. If I have exceptions <em>disabled</em>, it will terminate the application, and that means I <strong>cannot</strong> catch it and do nothing with it like I normally would do.</p>
  
  <p>Is there anyway to prevent invalid regex from throwing exceptions when it is constructed? Or some kind of <code>std::regex::isvalid("*")</code> check that exists?</p>
  
  <p>I was thinking maybe I could come up with a separate regex that parses the input regex expression string before I attempt the constructor, but I would much prefer an alternative.</p>