musclehead Posted May 13, 2008 Share Posted May 13, 2008 My head is spinning trying to figure out the correct syntax to do a regex to validate an IP address. I'm dealing w/ a /16 class network, so I only need to worry about the last 2 segments of the IP address and ensure they are valid (0-254). I have a simple comparison against the first 2 segments, as they will always be the same, but I'm trying to get a regular expression to check the last 2 segments of the IP address to ensure they're valid. I'd post code I've tried, but it's a mess...so I'll spare everyone the horror. Thanks!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.