I am developing an e-book reader application. I have an .ePUB file for the entire book, where there is an html file in every ebook topic. I want to implement a search function in an application. I am using the NSRegularExpression class to search. Please consider the following HTML:
<temp> I am temp in tempo with temptation </temp>
Say, for example, in the above html code, I just want to find the word temp. Now in the above code temp appears 5 times -> <temp> </temp>temp tempo temptation. I am looking for a regular expression where I can extract the whole word "temp". I do not want to consider the word temp in html tags <temp> </temp>. I also do not want the word tempo and temptation to be considered.
Thanks in advance
source
share