Guest User

Untitled

a guest
Jun 20th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. <?php
  2.  
  3. $pattern = "/<h2 class=\"date-header\">(.*)<\/h2>/";
  4.  
  5. $str = file_get_contents("1.txt");
  6.  
  7. $matches = array();
  8.  
  9. preg_match_all($pattern, $str, $matches);
  10.  
  11. if (count($matches) > 0)
  12. {
  13. unset($matches[0]);
  14. }
  15.  
  16. var_dump($matches);
Add Comment
Please, Sign In to add comment