title: PHP EWS exclude emails with specific Subject prefix
body: <p>I am trying to get list of emails those have not been replied or forwarded (Subject with RE: to exclude).</p>
  
  <p>Below is the code to get list of emails with specific subject prefix.
  What do I need to do to exclude specific subject prefix?</p>
  
  <pre><code>$currentRestriction-&gt;Contains = new EWSType_ContainsExpressionType();
  $currentRestriction-&gt;Contains-&gt;FieldURI = new EWSType_PathToUnindexedFieldType()
  $currentRestriction-&gt;Contains-&gt;FieldURI-&gt;FieldURI = 'item:Subject';
  $currentRestriction-&gt;Contains-&gt;Constant = new EWSType_ConstantValueType();
  $currentRestriction-&gt;Contains-&gt;Constant-&gt;Value = 'test';
  $currentRestriction-&gt;Contains-&gt;ContainmentComparison = new EWSType_ContainmentComparisonType();
  $currentRestriction-&gt;Contains-&gt;ContainmentMode = new EWSType_ContainmentModeType();
  &amp;currentRestriction-&gt;Contains-&gt;ContainmentMode-&gt;_ = EWSType_ContainmentModeType::PREFIXED;
  </code></pre>