Membership is FREE – with unlimited access to all features, tools, and discussions. Premium accounts get benefits like banner ads and newsletter exposure. ✅ Signature links are now free for all. 🚫 No AI-generated (LLM) posts allowed. Share your own thoughts and experience — accounts may be terminated for violations.

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:

Rule #1: Be Respectful

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

Members online

Premium Members

New Threads

Domain Forum Friends

Lastest Listings

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Siusaidh AcornBot:
    Siusaidh has left the room.
      Siusaidh AcornBot: Siusaidh has left the room.
      Top Bottom