0 Replies Latest reply on Jan 31, 2017 8:35 PM by chrlsdrwn12

    [CC][JS]Searching for the most reliable URL grep pattern

    chrlsdrwn12 Level 1

      Hi fellow scripters,

       

      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:

       

      (http|https|Http|Https|rtsp|Rtsp|Ftp|ftp|Www|www).+?(?=(\)|\.|\,|\?|\!|\"|'|;|\r)*($|\s))

       

      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.

       

      -CharlesD