title: traverse back in php from a specific keyword or position
body: <p>I want to find the string from </p>
  
  <pre><code>$str = "Hello this is dummy.test. in this string  
  any character, any special character can appear. it is not a fixed type 
  text and predefined. this string will not read manually check by the 
  Programmer.Sorry for the bad English.";
  </code></pre>
  
  <p>my algo is fixed because some kind of problem.
  First I want to find the position of <strong>test</strong> keyword then want to go back from <strong>test</strong> to <strong>dummy</strong> keyword to find position of <strong>dummy</strong> keyword .</p>
  
  <p>I also searched and also use the internet but no any function found in PHP which can traverse back in this way. </p>
  
  <p>I also test <code>strrpos()</code> but not relevant and required result.
  Any solution please.</p>
  
  <p><strong>Output needed</strong> : <strong>dummy.test</strong></p>
  
  <p><strong>Algo</strong> : <strong>find first right (test) and then right to left (dummy) only. not first right (test) and then from starting to left (dummy) .</strong></p>