From h_and_p at hotmail.com Tue Oct 10 18:12:38 2006 From: h_and_p at hotmail.com (HolliePeter KounalisGiles) Date: Tue Jul 1 03:33:06 2008 Subject: [xsstl-users] ip4v regexp error? Message-ID: Looks to me like there is an error in the regexp for ipv4 addresses: ((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9]) one of your cases for an octet is [1-9][0-9]|[0-9], which could match 999, so 999.999.999.999 would be accepted as a valid address. Regards, Peter From boris at codesynthesis.com Wed Oct 11 16:21:41 2006 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Jul 1 03:33:06 2008 Subject: [xsstl-users] ip4v regexp error? In-Reply-To: References: Message-ID: <20061011202141.GA5880@karelia> Hi, Peter HolliePeter KounalisGiles writes: > Looks to me like there is an error in the regexp for ipv4 addresses: > > ((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9]) > > one of your cases for an octet is [1-9][0-9]|[0-9], which could match 999, > so 999.999.999.999 would be accepted as a valid address. It would match '999' is it were [1-9][0-9][0-9], but since it is [1-9][0-9] -or- [0-9] then it won't match 999. I just tested it in perl everything works as expected. Or am I missing something? ;-) -boris -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 652 bytes Desc: Digital signature Url : http://codesynthesis.com/pipermail/xsstl-users/attachments/20061011/04a4974b/attachment.pgp