Hiring Regex Expert needed for custom wordpress/php/sql coding to replace links

Status
Not open for further replies.

XCOLVE

Active Member
515
2014
375
1,895
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

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.
 
4 comments
I also need to know this. Please buzz me up to if this is possible. Also @ XCOLVE try to install and use Search Regex it will do your work.

Search regex is just a simple regex string, this tool need to be more advance because it has to pick the new link from the new host and insert it, that data is random so you can't use a regex replace to create that string it needs to be read from a document in batch or something, i know it's possible, i just don't know php good enough to do this

To anyone out there with the expertise, there's gonna be a lot of people wanting to buy this scripts of you, can easily make a couple of thousand bucks, i'd code this if i could even if i didn't need it, very many people would use this.

Also a good way for us uploaders to have something to counter shaving hosts who have power to shave cause users know switching to a new host means weeks upon weeks of manually replacing links.
 
Last edited:
dropped you a pm, the link you sent probably makes more sense if you're a coder competent enough to do this, i only know css and html by hand and a little simple php, i would not dare to deal with regex, i've tried it before and its not my thing :P

__________________
Added after 1 Day 22 Hours:

bump still need this!
 
Last edited:
Status
Not open for further replies.
Back
Top