fork download
  1. <?php
  2.  
  3. $variavel = "<div><div>texto1<a>texto2</a><b>texto3</b></div>texto4</div>";
  4.  
  5. if (preg_match_all("/\>(.*?)\</", $variavel, $matches))
  6. {
  7. }
Success #stdin #stdout 0s 82944KB
stdin
Standard input is empty
stdout
Array
(
    [0] => texto1
    [1] => texto2
    [2] => texto3
    [3] => texto4
)