Check this sample application which highlights all instances of a searched string in an Text area and also find and highlight the searched string with a find and previous button
http://labs.tom-lee.com/Flex/HighlighterDemo/HighlighterDemo.html
This ia a very good example with the viewsource enabled.