using System; using System.Text.RegularExpressions; class Regexip { static void Main(string[] args) { if (args.Length < 1) { Console.WriteLine("regexip "); } else { Regex regex = new Regex(@"(\d+)\.(\d+)\.(\d+)\.(\d+)"); Match m = regex.Match(args[0]); if (m.Success) { for (int i = 1; i < m.Groups.Count; i++) { Console.WriteLine("Groups[" + i + "] = " + m.Groups[i].Value); } } } } }