fork download
  1. <?php
  2.  
  3. $data = '
  4. <div class="information di-ib mt4">
  5. Movie (1 eps)<br>
  6. Aug 2016 - Aug 2016<br>
  7. 380,496 members
  8. </div>
  9. <div class="information di-ib mt4">
  10. Movie (3 eps)<br>
  11. Aug 2016 - Aug 2016<br>
  12. 380,496 members
  13. </div>
  14. <div class="information di-ib mt4">
  15. Movie (5 eps)<br>
  16. Aug 2016 - Aug 2016<br>
  17. 380,496 members
  18. </div>
  19. ';
  20.  
  21. if (preg_match_all("/\((?P<qtd>\d+) eps\)/", $data, $matches))
  22. {
  23. print_r($matches["qtd"]);
  24. }
Success #stdin #stdout 0.01s 82944KB
stdin
Standard input is empty
stdout
Array
(
    [0] => 1
    [1] => 3
    [2] => 5
)