Guest User

Untitled

a guest
Jan 27th, 2013
181
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <string>
  3.  
  4. #include <boost/regex.hpp>
  5.  
  6. int main()
  7. {
  8.     boost::regex test_regex("a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?"
  9.                             "a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?"
  10.                             "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
  11.     std::string test_string("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
  12.  
  13.     if (regex_match(test_string, test_regex)) {
  14.         std::cout << "ok\n";
  15.     } else {
  16.         std::cout << "no\n";
  17.     }
  18. }
RAW Paste Data