fork download
  1. using System;
  2. using System.Net;
  3.  
  4. namespace n
  5. {
  6. class Program
  7. {
  8.  
  9. static void Main(string[] args)
  10. {
  11.  
  12. string s = "длад123.123.11.21ывф12ыл 123.123.11.22 пдылдлп клд.л123.123.11.22вп 55-50-32 плдла 888.123.10.25";
  13.  
  14. var q = s.Split(' ');
  15.  
  16. IPAddress tmp;
  17. foreach (var a in q)
  18. {
  19. bool flag= IPAddress.TryParse(a, out tmp);
  20. if(flag)
  21. Console.WriteLine(tmp.ToString());
  22. }
  23. }
  24. }
  25. }
  26.  
Success #stdin #stdout 0.04s 33936KB
stdin
Standard input is empty
stdout
123.123.11.22