My application collects HTML content provided by internal users that is used to dynamically build articles on company web site.
I want to implement a feature whereby users can surround a word/phrase in the HTML content with a special tag called <search>....</search> and when the content is saved in the database, the application will convert <search>WORD/PHRASE</search> to say www.google.com/?q=WORD/PHRASE after encoding the word or phrase.
I think regular expressions can be used to achieve this functionality but need some guidance on how to go about it since there could be more than one <search>....</search> tag in the HTML content.
Any help with examples is appreciated.