Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

Find and replace in wp_posts table - regex, phpmyadmin?

Joined
Aug 2, 2015
Posts
1
Reaction score
1
Hi Guys,

I have a couple of lines of html that I want to find and replace with another couple of lines. The code appears in a wordpress install in the post_content field of wp_posts. Simple enough - I know how to do it in phpmyadmin using sql or with a couple of plugins. However I want to include a couple of wildcards in the expression that I am searching for. I can't seem to work out how to do it as I'm not good with regex syntax. Can I do it in PHPMyAdmin simply via the search tab for wp_posts?

For example a section of the code I am searching for starts with this;
<p><center><iframe src="http://www.frilly.com/affxml/Home.do?preflang=en&country=france&city=paris

I want to add wildcards for the city and country something like this?
<p><center><iframe src="http://www.frilly.com/affxml/Home.do?preflang=en&country=/(.*?)\&city=/(.*?)\"

Can someone tell me which tree to bark up and hopefully what sort of barking I should try!!?
 
I have actually done something very similar to this before, a few months ago, after following instructions on a stackoverflow post (may want to have a poke around on there via internal search).

Don't ask me how I did it now though. Stackoverflow is probably the best venue for questions like this if you don't get an answer on here.
 
Last edited:

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members online

No members online now.

Premium Members

New Threads

Domain Forum Friends

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom