i try to get 2 last octets from IP address from diferents strings.
Some of them will have syntax like:

```
ABCD_192.192.111.123 or
ABCD_EFG_192.111.123.192

```

how can I grep in universal way only first part of string + 2 last octets from IP? e.g:

```
ABCD_111.123 or
ABCD_EFG_123.192

```

now i can only get IP

furthermore i need avoid using temp files.