title: php get word directly after certain word in string
body: <p>I'm trying to write a script that parses an email and looks for certain strings after certain strings.</p>
  
  <p>For instance, let's say i have the following email body.</p>
  
  <pre><code>$body = "Dear John Doe, your information is below
  Check in date: 07/23/2012
  Check out date: 07/26/2012
  
  Alternate Check in date: 07/27/2012
  Alternate Check out date: 07/29/2012";
  </code></pre>
  
  <p>I want to grab the 'word' directly after the first instance of "Check in date:", which would be "07/23/2012". The 'word' being the next set of characters with spaces around it. I included  the 'alternate' parts because some emails will have a text version and an html version. </p>
  
  <p>I think i need to use a combo of strpos(), substr(), and explode() but i'm not sure how. Any suggestions?</p>