cptnmacro 0 Posted October 13, 2011 Report Share Posted October 13, 2011 I am filling a in a description field from a text file and would like to change the source of the images. For example I'd like to change <img src="bob.com/bg.gif" /> to <img src="nancy.com/bg.gif" />I've tried to use the $replace to make the change, but it is deleting all of the other html in the field. I watched the tutorial on using replace, but it only shows how to replace the word store with the best restaurant in town. Any help is appreciated. Quote Link to post Share on other sites
JohnB 255 Posted October 13, 2011 Report Share Posted October 13, 2011 You will either need to use replace regular expression or insert a unique string in the file to replace. John Quote Link to post Share on other sites
mamica 10 Posted October 13, 2011 Report Share Posted October 13, 2011 Yea i would as well like to know how to replace specific character in a word or in a link. And let the rest of the link or word same. Quote Link to post Share on other sites
mamica 10 Posted October 13, 2011 Report Share Posted October 13, 2011 Ok i have play with it. You just need to search for a text that you want to replace and everything else will be same. Quote Link to post Share on other sites
UBotBuddy 331 Posted October 13, 2011 Report Share Posted October 13, 2011 Whoa!!!!!!!!!!!!!!!!! Regular Expressions is overkill for something like this. $replace will do the job easily and effectively. I am the King of this function. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.