here is an overview: I am working with a CMS I wrote for our company. It has templates with "tags" in them that the CMS replaces with content. <%=tag name%>Well the templates are created visually with a Rich Text Editor on a webform. In IE, in the RTE, IE "rewrites the code", just like it does in Frontpage (grr) to HTML 4 Transitional meaning is uppercases all tags <img> becomes <IMG>, so my regexp pattern was checking for only lowercase thus the [img|img] (find upper or lowercase)also the end of the pattern was tring to find ">" but it found it at the end of the CMS tag %> not the end of the img tag. so I temporaily replaced the tag markers while search with regexp.