Internet URL Regular Expression

The ASP.net Internet URL Regular expression is not complete and i was surprised the other day when an application that i have written stopped working suddendly. The form would not submit because it thought that the URL below was wrong.

http://ycsoftware.net/careers/job_search.aspx?flag=true&User_ID=&Locale=&arrCountry=United%20States&arrState=CO;arrCompany=>Ycsoftware%20Freight;&strKeywords=SoftwareEngineers

The Build in regular expression does not expect “semicolon” in URL. I have found the regular expression below online and it seems to work fine for me. Give it a shot

 

Internet URL Regular Expressions

(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?

Reference:
http://regexlib.com/