I have an issue with regular expression. I need to validate for the following url
http://50.244.41.23/
http://myserver/
I have used following expressions
Regex urlRx = new Regex(@"(http|https)://([0-9]*)", RegexOptions.IgnoreCase);
Regex urlRx = new Regex(@"(http|https)://(\b(?:\d{1,3}\.){3}\d{1,3}\b)", RegexOptions.IgnoreCase);
Both are working up to an extent, But it doesn't serve the exact purpose. It gives success for the following strings, But i want the expression to fail for such strings..
http://50.244.41.23\
http://256.244.41.23/
http://256.244.41.23.123/
Can someone help to create an apt regex validation for the above url.
Thanks Sebastian