in reply to Replace characters not in html tags
/>[^<]*$a/s; [download]
s/(>[^<]*)$a/$1$b/sg; [download]