title: search in strings to find word with preg match all and regex
body: <p>i am trying to code a search function to search in strings and find the word</p>
  
  <p>like the php + mysql for example</p>
  
  <pre><code>Select * From Column Where ID Like %Word%
  </code></pre>
  
  <p>i tried to code the same idea with Preg match all and regex</p>
  
  <p>Here is my code</p>
  
  <pre><code>$strings = '
  ( monstername 205 "Devil Troop of Desire")
  ( monstername 206 "  Devil Troop of Pain     "  )
  ( monstername 207       "Devil Troop of Greed")
  ( monstername 208   "       Devil Troop of Jealousy  ")
  ( monstername 207 "Mask Troop of Greed"  )';
  
  preg_match_all('/monstername\s*(.*?)\s*\"\s*\\b(Jealousy)\b\s*\"\s*\)/i', $strings, $matches, PREG_SET_ORDER);
  foreach ($matches as $match){list (, $MonsterNumber) = $match;
  echo "$MonsterNumber";
  }
  </code></pre>
  
  <p>the output should be </p>
  
  <pre><code>208
  </code></pre>
  
  <p>but it dont display the output correct</p>
  
  <p>it display it when i replace <strong>Jealousy</strong> With <strong>Devil Troop of Jealousy</strong></p>
  
  <p>i just want to do the same idea of php + mysql </p>
  
  <p>Where ID Like %Word%</p>
  
  <p>without give the full string to find the number of monster</p>