ok, so i have this so far

String p = "(http|ftp|https):" + // sees if the proto is any of these
" (\\:[\\w^\\:]+:)?   " + // gets the sub-proto
" \\/\\/" + // the two forward slashes
"([\\w*.]+)" + // gets the subdomain(s), domain and tld
"[\\:\\w*^";

and the format for the url is this;
proto:[sub-proto:]//[sub-domain.]domain[.tld][:port][/directory][/file.ext][?querystring]

Ive looked at a bunch of tutorials on regx and even looked at some url reg expressions but none of them really helped much

Thanks in advance

Recommended Answers

All 2 Replies

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.