Mar-06-2020, 12:14 AM
i am wanting to avoid having to write a function to find the Nth IP address in a string of characters
i do have some thought issues about it. when counting IP addresses to get to the Nth address, should i count substrings that "look like" an IP address even if it is invalid? what should "look like" be? 4 decimal numbers separated by 3 single dots? do i let a typo like a double dot be skipped and end up with the wrong address?
my goal is to create a program to sort files by IP address (IPv4-only first, including IPv6 later). maybe there is something to do this. these will be huge (perhaps many GB) log files not suited for reading it all into RAM. if i develop this, i'll more likely convert each IP address to a number and use the existing "sort" command since it designed to handle massive sized files.
i do have some thought issues about it. when counting IP addresses to get to the Nth address, should i count substrings that "look like" an IP address even if it is invalid? what should "look like" be? 4 decimal numbers separated by 3 single dots? do i let a typo like a double dot be skipped and end up with the wrong address?
my goal is to create a program to sort files by IP address (IPv4-only first, including IPv6 later). maybe there is something to do this. these will be huge (perhaps many GB) log files not suited for reading it all into RAM. if i develop this, i'll more likely convert each IP address to a number and use the existing "sort" command since it designed to handle massive sized files.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.