Advertisement
Guest User

Untitled

a guest
Jan 27th, 2013
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement