Hacker News new | past | comments | ask | show | jobs | submit login

You probably just shouldn't try to do string matching here and just use one of the conversion function to get them to binary, apply the mask, and see if they match



IPv4 has problems with the non-standard formats that use octal or combine octets. Like 192.168.1 is 192.168.0.1, 127.0.0.1 is 127.1.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: