Ignore html tag element

I don't like too much implementing RegExp pattern.. 
but I added it to ignore html tags from replacing matchText. please look at this