Hi ALL,
I want to build a regular expression in c++{MFC} which validates the URL.
The regular expression must satisfy following conditions.
Valid URL:- http://cu-241.dell-tech.co.in/MyWebSite/ISAPIWEBSITE/Denypage.aspx/ http://www.google.com http://www.google.co.in
Invalid URL:- 1>http://cu-241.dell-tech.co.in/\MyWebSite/\ISAPIWEBSITE/\Denypage.aspx/ = Regx must check &
invalid URL as '\' character between "/\MyWebSite/\ISAPIWEBSITE/\Denypage.aspx/"
2>http://cu-241.dell-tech.co.in//////MyWebSite/ISAPIWEBSITE/Denypage.aspx/ = Regx must check
& invalidate URL due to multiple entries of "///////" in url.
3>http://news.google.co.in/%5Cnwshp?hl=en&tab=wn = Regex must check & invalidate URL for
additional insertion of %5C & %2F character.
How can we develop a generic Regular Expression satisfying above condition. Please, Help us by providing a regular expression that will handle above scenario's in
CPP{MFC}
Thnaks & Regards, Amit & Pravin
Ads