zonfar 1 Posted December 22, 2012 Report Share Posted December 22, 2012 There are a bunch of links on a website I am trying to scrape but I want to get rid of the last part of the url. For example this one of the urls: http://website.com/2134567/thisisatest.avi I want to get rid of the"/thisisatest.avi" and all the urls have different titles. Is there any way to delete the ending part so I would end up scraping just http://website.com/2134567? Thanks! EDIT: Just figured out how to do it using the regular scrape page function. I've been spoiled using scrape attribute I forgot all about using regular scrape page haha Quote Link to post Share on other sites
HelloInsomnia 1103 Posted December 22, 2012 Report Share Posted December 22, 2012 If there is always a . there like .avi then you can use the file below, if there is not a dot at the end change the regex to this: \/\w+$ http://www.mediafire.com/?rco893i66p0kcf6 For some reason the forum wont let me upload the ubot file.. Quote Link to post Share on other sites
Aymen 385 Posted December 23, 2012 Report Share Posted December 23, 2012 use $replace regular expressionreplace "/thisisatest.avi" by "$nothing" Quote Link to post Share on other sites
Randy Role 1 Posted December 25, 2012 Report Share Posted December 25, 2012 Try this: \S+\/ 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.