Page 1 of 1

Is string a valid url

Posted: Wed Jan 20, 2021 2:20 pm
by tad.chen
Hi,
Is there some class or unit I can use to test if a string is a valid url?

I use some open function like IsValidUrl(), but it can only check full Url. Inputting some url without scheme such as 'www.google.com' will return false by it.

Re: Is string a valid url

Posted: Thu Jan 21, 2021 9:15 am
by salvadordf
uCEFMiscFunctions has two functions that can also be used to validate URLs : CustomPathIsURL and CefParseUrl

You can also try the Indy components :
https://stackoverflow.com/questions/16703063/how-do-i-parse-a-web-url

Re: Is string a valid url

Posted: Sat Jan 23, 2021 5:30 am
by tad.chen
Thank you for your information!