C# regex to validate "realistic" IP values

Posted by Joshua on Stack Overflow See other posts from Stack Overflow or by Joshua
Published on 2010-04-05T20:10:48Z Indexed on 2010/04/05 20:13 UTC
Read the original article Hit count: 474

Filed under:
|
|

Regex that somewhat validates if a value has one of the following characteristics:

123-29-123-123.subdomain.zomg.com:8085
123.12.34.56:420

Unfortunately, I'm terrible at Regex, C#, google searches, and the differences between proper nouns and regular ones.

It can be a lose approximation, in fact I would go with anything that has a : colon separator with a port after it.

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET