Php versions – Check URL/IP with port with regex
My Java 11/Android app has to check if the URL/IP the user entered could theoretically be valid (using myURL.trim().matches(regex)). What should be valid (including variations): stackoverflow.com http://stackoverflow.com http://amazon.co.uk https://www.amazon.co.uk ftp://10.1.1.9 10.1.1.9:1234 http://10.1.1.9:1234/bla What shouldn't be valid: http://bla bla "---" (without…