Hello,
I'm looking to hire a regex expert with good knowledge of php, mysql and wordpress. What i'm looking to do: Make a plugin for wordpress 3.9.x that can replace content in post content based on a criteria of information.
Lets say i want to get rid of "terriblehost.net" i want to be able to batch input a whole series of links acquired from a new host to replace the terriblehost links with regex.
EXAMPLE:
I've got my new links from the new host i wish to use, lets call the host newhost.com
My old post data looks like this:
as you can see there's more then one host involved, i specifically only want to replace the "terriblehost.net" links.
the regex identifier for replacement will be the filename as it's always unique and static, then we need it to match with the host so regex knows which string to replace (we don't want to replace all strings with matching filename!)
The result if working properly would be:
As you can see, linkhost.com has not been modified while terriblehost.net has been replaced with newhost.com with the new linking code.
This tool does not necessarily have to be a wordpress plugin, if you can show me how to how to this without a plugin i'd still pay, i just need to be able to do this one way or the other. Perhaps you have a script laying around already?
Thank you.
I'm looking to hire a regex expert with good knowledge of php, mysql and wordpress. What i'm looking to do: Make a plugin for wordpress 3.9.x that can replace content in post content based on a criteria of information.
Lets say i want to get rid of "terriblehost.net" i want to be able to batch input a whole series of links acquired from a new host to replace the terriblehost links with regex.
EXAMPLE:
I've got my new links from the new host i wish to use, lets call the host newhost.com
Code:
<a href="http://newhost.com/file/3424326324/mymovie.avi">mymovie.avi</a>
<a href="http://newhost.com/file/1026773437/mymovie.avi">new1.avi</a>
My old post data looks like this:
Code:
<a href="http://linkhost.com/file/5253k2h6235k/mymovie.avi" target="_blank">mymovie.avi</a>
<a href="http://terriblehost.net/file/5sdg30hgfdh35k/mymovie.avi" target="_blank">mymovie.avi</a>
<a href="http://linkhost.com/file/12sfgsdd6543k/mymovie.avi" target="_blank">new1.avi</a>
<a href="http://terriblehost.net/file/5sfgfds73h6235k/mymovie.avi" target="_blank">new1.avi</a>
as you can see there's more then one host involved, i specifically only want to replace the "terriblehost.net" links.
the regex identifier for replacement will be the filename as it's always unique and static, then we need it to match with the host so regex knows which string to replace (we don't want to replace all strings with matching filename!)
The result if working properly would be:
Code:
<a href="http://linkhost.com/file/5253k2h6235k/mymovie.avi" target="_blank">mymovie.avi</a>
<a href="http://[B]newhost.com[/B]/file/3424326324/mymovie.avi">mymovie.avi</a>
<a href="http://linkhost.com/file/12sfgsdd6543k/mymovie.avi" target="_blank">new1.avi</a>
<a href="http://[B]newhost.com[/B]/file/1026773437/mymovie.avi">new1.avi</a>
As you can see, linkhost.com has not been modified while terriblehost.net has been replaced with newhost.com with the new linking code.
This tool does not necessarily have to be a wordpress plugin, if you can show me how to how to this without a plugin i'd still pay, i just need to be able to do this one way or the other. Perhaps you have a script laying around already?
Thank you.