Civize 3 Posted June 28, 2013 Report Share Posted June 28, 2013 (edited) Hey guys. Im pretty new to ubot and this is going to be my first question regarding an issue im having. Basically Im trying to replace everything in the following URL before sub= http://abc.xyz.com/c/187/20468-45700-?us=http%3A%2F%2Fwww.xyz.com&t=3801&aff_sub=4bca36660bbe349aa726f4e3b34aba60&mobile=1 That way i would be left with this: 4bca36660bbe349aa726f4e3b34aba60&mobile=1 and then i want to add a different URL before it which i believe can be just done with the replace regex command in ubot. Im just having difficulty with the regex string so any help would be greatly appreciated. Cheers. Edited June 28, 2013 by Civize 1 Quote Link to post Share on other sites
Civize 3 Posted June 28, 2013 Author Report Share Posted June 28, 2013 (edited) Anyone? =[ Edited June 28, 2013 by Civize 1 Quote Link to post Share on other sites
ds062692 19 Posted June 28, 2013 Report Share Posted June 28, 2013 Try this. Replace the $url with the variable where you want to replace the regex. set(#url, $replace regular expression($url, "http(.*?)sub=", ""), "Global") 1 Quote Link to post Share on other sites
Civize 3 Posted June 28, 2013 Author Report Share Posted June 28, 2013 Try this. Replace the $url with the variable where you want to replace the regex. set(#url, $replace regular expression($url, "http(.*?)sub=", ""), "Global") Worked like a charm.. Thanks! 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.