Below pattern works perfectly fine for extracting data with html tags without utf8 characters.
Please help me to find out method to find out all <h1>,<div> tags .
I have attached two sample files .
1> pattern works for "Backward-history-info.php
" file even having UTF8 characters within it. But if edited it stops working.
2> file does not shows any data for other file i.e "Backward_past_références.
3> please even let me know how to handle file name "Backward_past_références.
php" with utf8 characters via file_get_contents()
$pattern = "/<" . $tag . "(>|.+?(?<!<|>)>).+?(?<!<"
. $tag . ")(.+?)<\/" . $tag . ">/i";