remove leading and trailing whites from IP