0

Say I have this

str="System IP is 9.9.9.9 on port 3442"
str2="ip 192.168.0.9 is using port 222"

I would like to remove all substrings except for the one which contains periods which would leave me with :

9.9.9.9 
192.168.0.9

Any ideas ?

Mike Q
  • 6,716
  • 5
  • 55
  • 62

0 Answers0