I am doing this search engine...
Can I use regex to match word that is in the last/last few lines of the article,
and show up that line of it, with the matched/searched word being highlighted.
I already did it by highlighting the matched/searched word, but if the searched word is in the
last/last few lines of the article, it will not showed up that line...
Its like Google, but of course google is more complex,
I was thinking can it be done by juz using regex??
$s = $search;
$row[title]=preg_replace("/($s)/i","<font class=search>\1</font>",$row[title]);
$row[body]=preg_replace("/($_s)/i","<font class=search>\1</font>",$row[body]);
Can anyone help me with this??
Thanx!!!