I'm in a bit of a jam here. I got over 6000 videos that are embeded into post's in a wordpress database. I'm looking for a dynamic way to change this: <p><embed src="http://www.veoh.com/veohplayer.swf?permalinkId=v161810549Y9PB9nF&id=16071029&player=videodetailsembedded&videoAutoPlay=0" allowFullScreen="true" width="540" height="438" bgcolor="#FFFFFF" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></p> Into this: <p><IFRAME border=0 marginWidth=0 marginHeight=0 src="http://www.watchanimeon.com/veoh.php?id=v161810549Y9PB9nF" frameBorder=0 scrolling=no width="510" height="414"></iframe></p> When the Red text is dynamic and difrent on each post and needs to be included in each find and replace string. I could have done it myself if this was the case but the blue text u see is also dynamic but does not need to be replced only deleted, So this rules out a lot of Mysql simply search and replace code. Any ideas are highly welcome. Thanks a lot. Izzy
Learn regexp Most useful text tool ever. For ex. I can turn http://en.wikipedia.org/wiki/List_of_Family_Guy_episodes into a mysql INSERT query using regexp
Hi logylaps thanks for the tip can u provide me with more info on how to do the following using regexp. Thanks, Izzy
With a good regexp, you would use the video ID as a maker and find the first <p> before it, and after it. Then replace all of that with the new code. It would only work, if the ID is only used once. I notice your video sizes aren't the same, ie 540x438 vs 510x414, why?