title: Getting a part of IP address String
body: <p>If I have a IP address String like : 10.120.230.78 I would like to get 10.120. out of it</p>
  
  <p>But the parts of the address can change from 1 tot 3 numbers as we all know ... </p>
  
  <p>1.1.1.1 to 255.255.255.255 so ....</p>
  
  <p>I believe you can use a pattern, but I don't have an idea how to.</p>
  
  <p>Please, any suggestions would be welcome.</p>
  
  <p>thx all</p>