Are you looking to get a string whose value is "192.168.3" Or are you looking to get numerical values for each of the individual IP address octets?

If it's the first one:

Suppose you have a...