I am trying to figure out how to search string that start in a specific text and end in a div tag.
for example this is a sample html text file
<div class="_3-96 _2pio _2lek _2lel">You searched for some name</div><div class="_3-94 _2lem">Aug 15, 2018 2:51pm</div></div><div class="pam _3-95 _2pi0 _2lej uiBoxWhite noborder"><div class="_3-96 _2pio _2lek _2lel">You searched for Mark George</div><div class="_3-94 _2lem">Aug 15, 2018 2:50pm</div></div><div class="pam _3-95 _2pi0 _2lej uiBoxWhite noborder"><div class="_3-96 _2pio _2lek _2lel">You searched for Mark Gold</div>
i want to extract and out put the following string
You searched for some name You searched for Mark George You searched for Mark Gold
$homepage = file_get_contents('http://xps/duplicate/text.html');
I load the text.html file into string how to use regex to extract the search strings
Thank You
Comments
Post a Comment