GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   anyone good at regex ? help needed. (https://gfy.com/showthread.php?t=1013274)

cooldude7 03-07-2011 11:45 PM

anyone good at regex ? help needed.
 
i have word press site,
it has links in each post in following pattern.


http://jump2link.net/watch/getdownloadmanager.php?movie=Sculpture%20(2009)%20 &authid=1321

http://jump2link.net/watch/getdownloadmanager.php?movie=Dreams%20and%20Shadow s%20(2009)%20&authid=1321

so i want to replace all these links using "search regex" plugin.

i neeed help in generating regex pattern so that all links will get searched by this plugin and i can replace them.

thanks for your time.

cooldude7 03-07-2011 11:48 PM

as u can see the

http://jump2link.net/watch/getdownloadmanager.php?movie=

this part is constant in each url and later on the movie name which is random in each post.

Antonio 03-08-2011 12:01 AM

if I have to take a (very) wild guess here, you should be able to do that in MySQL without having to mess with regex at all

there should be a query that finds "http://jump2link.net/watch/getdownloadmanager.php?movie=" in your links and then you can replace them with other entries?????

or a few lines of PHP???

cooldude7 03-08-2011 12:07 AM

Quote:

Originally Posted by Antonio (Post 17964861)
if I have to take a (very) wild guess here, you should be able to do that in MySQL without having to mess with regex at all

there should be a query that finds "http://jump2link.net/watch/getdownloadmanager.php?movie=" in your links and then you can replace them with other entries?????

or a few lines of PHP???

thanks for your reply, i m looking for it now.

cooldude7 03-08-2011 12:57 AM

i got it,

search for
/getdownloadmanager.php\?([^\"]*)\">/iU

i.e.

# starts with: getdownloadmanager.php?
# a series of characters up to, but not including, the next double-quote (") - 1st capture
# the string: ">

HarryMuff 03-08-2011 01:01 AM

Dunno if this will work i just typed it in here havn't tested.

Code:


/^(http:\/\/jump2link.net\/watch\/getdownloadmanager.php?movie=){1}.+(1321){1}$/



All times are GMT -7. The time now is 02:26 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc