How could display only the number of ip?

$gettok($gettok($1-,-1,91),1,93)

Works in the first instance but not in the second

Example 1
Nick1 (-@host171.190-30-83.host.net => Host-71DFF749.host.net) (asd) [xxx.xx.xx.xxx] connected to the network

Example 2
Nick (-@109-243-231-201.host.com => Host-247F741D.host.com) (xxcap[8.32] • wxw.xxcap.com) [xxx.xxx.xxx.xxx] connected to the network