The regular expression in isURL is not working for all cases.
False negatives (incorrectly returns false):
https://link.springer.com/article/10.1057/s41303-017-0039-0
https://www.academia.edu/12962582/Embodiment_Semiosis._Violi_P
False positives (incorrectly returns true:
3.5/5
Create a regexp which returns true for the following URLs:
http://nonssl.com
https://ssl.com
localhost:3000/
nohttp.com
withslash.com/
sub.domain.com
withpath.com/a/b
And returns false for the following:
e.g.
3.5/5
My current RegExp =
/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w-]+)+[\w\-_~:/?#[\]\@!\$&'\(\)\*\+,;=]+$/i
Plus I found this RegExp = ^((ftp|http|https)://)?(www.)??(?!.(ftp|http|https|www.))??[a-zA-Z0-9_-]+ (.[a-zA-Z]+)+((/)[\w#]+)(/\w+\?[a-zA-Z0-9_]+=\w+(&[a-zA-Z0-9_]+=\w+)*)?$ but accept everthing except localhost:3000, http://localhost:3000/