Results 1 to 2 of 2
Feb 13, 2013, 03:31 #1
- Join Date
- May 2011
- 0 Post(s)
- 0 Thread(s)
Regular Expression For Search Functionality
I am implementing a search functionality for some static pages. My Content is in p tag's, span, div, li's. If I search a word which is in p tag then it get searched but except that non of the word get searched. Below is the regular expression which I am using:
preg_match_all("/\<p\>(.*)".$_GET['s']."(.*)\<\/p\>/i", $contents, $matches, PREG_SET_ORDER);
I want such a regular expression which will search all the words no matter it is in p tag, span, div or li. it should get searched.
Can someone help?