I'm accessing a log file that has lines as:
May 1 07:39:30 example-server sshd[61362]: reverse mapping checking getaddrinfo for 37-115-223-100.broadband.kyivstar.net [37.115.223.100] failed - POSSIBLE BREAK-IN ATTEMPT!
May 1 07:42:02 example-server sshd[61698]: reverse mapping checking getaddrinfo for 234.10.13.218.broad.fs.gd.dynamic.163data.com.cn [218.13.10.234] failed - POSSIBLE BREAK-IN ATTEMPT!
I want to parse the file and extract the IP address inside the square brackets that are after the phrase ("reverse mapping checking...." and before the word "failed")
I'm new to regular expressions and can't figure out the step.
Also, Ip address each octet being <100 or >100 is confusing as I can't use [0-9[0-9] (fixed stuff)
Please help me extract that IP address using any method.