I've been scripting for many years and i've been looking for the best grep pattern to capture URIs and all those years i've been checking our forum for the best one. Some of them are simple and some of them are complicated to the point that I don't understand the expression itself and I used them anyway but all of them failed one way or another. So I decided to create my own the only problem is it fails for the ones at the end of stories so I decided to post ([CC][JS]URL Grep at the end of story) and ask for help and luckily I got different responses and one of them is from Vamitul which makes it perfect for me:
The challenge now guys is to test and use this pattern for your own needs and reply here if it fails on any URIs you will encounter. Also if you think you have a better pattern than this one please post it here on this thread so we can test it as well.
Thanks and I hope this thread benefits our fellow scripters.