How a string object can be validate whether it is a link or not? I don't want to open any connection or network operation I just to want to check the pattern of string is matching to the pattern of a link or not. e.g
    let str1 = "https://stackoverflow.com/questions/ask" // It is a link
    let str2 = "https://stackoverflow.com" // It is a link
     // Could be other combinations as well of a valid link 
    let str3 = "this is not a link" // Not a link
How to do that? Is It possible to check with regular expression or any other way or not possible?
 
    