nuc63 27 Posted March 12, 2014 Report Share Posted March 12, 2014 Please Helpi have scraped a list of urls on facebook and each one has a &h code at end i need to $replace regular expression remove it from code. https://apps.facebook.com/&h=WAQHcnaQc&s=1 https://apps.facebook.com/&h=ZAQEBC8S4&s=1 https://apps.facebook.com/&h=gAQETLoYu&s=1 https://apps.facebook.com/&h=rAQEO1crn&s=1 thanks Quote Link to post Share on other sites
nuc63 27 Posted March 12, 2014 Author Report Share Posted March 12, 2014 dupe Quote Link to post Share on other sites
Bot-Factory 602 Posted March 12, 2014 Report Share Posted March 12, 2014 set(#tmp1, "https://apps.facebook.com/&h=WAQHcnaQc&s=1https://apps.facebook.com/&h=ZAQEBC8S4&s=1https://apps.facebook.com/&h=gAQETLoYu&s=1https://apps.facebook.com/&h=rAQEO1crn&s=1", "Global")set(#tmp2, $replace regular expression(#tmp1, "(?<=\\/)&h=.+(?=\\&)", ""), "Global") CheersDan 1 Quote Link to post Share on other sites
nuc63 27 Posted March 13, 2014 Author Report Share Posted March 13, 2014 thanks dan 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.