954,536 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Help with expressions (url validation and extract domain)

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

white feather
Light Poster
49 posts since Apr 2010
Reputation Points: 18
Solved Threads: 2
 
quuba
Posting Pro
573 posts since Nov 2008
Reputation Points: 123
Solved Threads: 106
 

I got it. Solved

white feather
Light Poster
49 posts since Apr 2010
Reputation Points: 18
Solved Threads: 2
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You