텍스트에서만 IP 추출 [닫기]

텍스트에서만 IP 추출 [닫기]
trans(776800911)[10.173.36.75]: Request processing failed: Network Error, from URL: 10.173.36.73:57743
trans(776800912)[10.173.36.75]: Request processing failed: Network Error, from URL: 10.173.36.74:57743
trans(776800913)[10.173.36.75]: Request processing failed: Network Error, from URL: 10.173.36.75:57743

답변1

$ grep -oP '\K[0-9.]+(?=:.*)' < ips.txt
10.173.36.73
10.173.36.74
10.173.36.75

관련 정보