title: Regular Expression to match a sequence
body: <p>I want a regeular expression to match a sequence.
  The sequence in which i want the regular expression to match is NP so to make sure all the way down the string that after the N there is a P and that before the P there is an N</p>
  
  <p><strong>1) NPNPNPNP = correct</strong></p>
  
  <p><strong>2)NPNPPNP = incorrect</strong></p>
  
  <p>SORRY GUYS I MISSED ONE MORE PART FROM THE QUESTION THE 3RD MATCH WOULD BE </p>
  
  <p><strong>3)NNNPNPNNP = correct</strong> SO THERE CAN BE MANY N's but at the end of the N there has to be a P to follow like above</p>
  
  <p>But i do not think my regular expression is correct, can someone show me where i am going wrong?</p>
  
  <pre><code>std::string a ("NPNPNPPN");
   boost::regex const string_matcher("\(NP\)*");
   if(boost::regex_match(a,string_matcher))
   {
       DCS_LOG_DEBUG("Yes it Matches ");
   }
   else
   {
       DCS_LOG_DEBUG("No it does not Match");
   }
  </code></pre>