Preg_replace excluding strings inside tags
OK, Ive been working on a little project for quite some time, I have everything working so far with a preg_replace function that takes words and replacement words as an array then runs through a string to replace them.
I am stuck as always with excluding tag data. As much as I search on phpnet I am not understanding how to exclude between an opening tag and closing tag.
tags I want to exclude are all, but the important ones are
I was actually writing a it to replace the values with temp holders, then run strip tags on the result, then preg_match on the results, then only use the remaining holders to actually replace the values in the starting text. Then I thought that was quite a bit of overhead for somthing that I believe can be resolved with an exeption.
Thanks in advance