grep + match exactly IP address with Regular Expression
问题 my target is to match exactly IP address with three octes , while the four IP octet must be valid octet - between <0 to 255> For example I have the following IP's in file $ more file 192.9.200.10 192.9.200.100 192.9.200.1555 192.9.200.1 192.9.200.aaa 192.9.200.@ 192.9.200.: 192.9.200 192.9.200. I need to match the first three octets - 192.9.200 while four octet must be valid ( 0-255) so finally - expects result should be: 192.9.200.10 192.9.200.100 192.9.200.1 the basic syntax should be as