Hi, I've got a problem, which appears to be quite simple but I'm struggeling to find the solution. I'm doing a replace on specific strings in my content which is being pulled into my pages. e.g. <cfset request.vContent = Rereplace(request.vContent, "\bMyWord\b","\bMyNewWord\b", "ALL")> Code (markup): This words fine... infact it words too well as it also replaces the string "myWord" in anchor text and titles, which is what i need to eliminate. for example <a href="www.MyWord.com" title="MyWord">MyWord link</a> Code (markup): becomes: <a href="www.MyNewWord.com" title="MyNewWord">MyNewWord link</a> Code (markup): when it needs to be: <a href="www.MyWord.com" title="MyWord">MyNewWord link</a> Code (markup): Thanks in advance for any advice. Sam.
Replace >MyWord not just MyWord <cfset test = '<a href="www.MyWord.com" title="MyWord">MyWord link</a>' /> <cfset vContent = Rereplace(test, ">MyWord",">MyNewWord", "ALL")> <cfdump var="#vContent#" />