Regular expression to match all tags in HTML document in iPhone
I am developing an application in which I am using HTML documents.Now I want the user to be able to search for a word or phrase through all the documents so i planned to take all the text escaping tags in a string and search for the given word in the string.For that I want a regular expression to identify tags.Currently I am using following regular expression to identify tags:
NSString *regEx=@"<.*>";
I know its not a perfect choice.I want suggestions on what expression should I use so that I could identify tags in HTML.I am little confused about how to use escape sequence in the same.Any help is great开发者_C百科ly appreciated.
Justin is correct. I didn't find any such regular expression.
精彩评论