Regex to find the text without a special character

Posted by Hunter on Stack Overflow See other posts from Stack Overflow or by Hunter
Published on 2012-10-16T04:47:35Z Indexed on 2012/10/16 5:02 UTC
Read the original article Hit count: 136

Filed under:
|

I have a paragraph, in that, some of the texts are surrounded with a specific html tag. I need to to find the text which are not surrounded by that specific html tag. For example

AVG Antivirus for Smartphones and Tablets detects harmful apps and SMS. 

<font color='black'>AVG</font> Mobilation™ AntiVirus Pro for Android™ is a mobile security 

solution that helps protect your mobile device from viruses, malware, spyware and online 

exploitation in real-time. avg blah blah...

I want to find the word AVG (case insensitive) which is not surrounded by <font color='black'> </font>. It can be part the word or single whole word. In the case of part of the text, the whole word containing the word AVG should not surrounded by that html tag

How can I do it with Java?

© Stack Overflow or respective owner

Related posts about java

Related posts about regex