TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Satyajit Kadam
NA
1
6.4k
Validate url sing regular expression (url may contains ip address or domain name)
Aug 7 2012 8:00 AM
Hello,
I am using below pattern in regular expression for validating url but this patterns returns false even when url contains ip address instead of domain name
string regExPattern = @"^(((ht|f)tp(s?))\://)?(www.|[a-zA-Z].)[a-zA-Z0-9\-\.]+\.(com|edu|gov|mil|net|org|biz|info|name|museum|us|ca|uk)(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\;\?\'\\\+&%\$#\=~_\-]+))*$";
I want pattern who returns true for below links
http://192.168.1.244/default.aspx
http://www.home.com/default.aspx
http://192.168.1.244:8080/default.aspx
Please give solution as soon as possible.
Thanks in advance
Reply
Answers (
1
)
dumping data table into Excel file using C#
What is Datamanager