I used to use similar F&R, Danger, but that approach burned me too many times when stuff was nested--as divs can be. Plus, I've learned to be appropriately afraid of relying too heavily on the potential greediness of (.*?). So now, when the actual
tags are what is needing replaced, I don't waste time trying to match/capture any-and-all text those tags might contain. I just match/capture/replace the tags themselves. To each their own though... that's the beauty of regex.