编辑代码

using System;
using System.IO;
using System.Text.RegularExpressions;

public class HelloWorld
{
    public static void Main()
    {
       //JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。
        Console.WriteLine("HELLO world!     - cs.jsrun.net ");

        string pattern = @"^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$";
        string ip="";
        bool IsIp=Regex.IsMatch(ip, pattern);

        Console.WriteLine("HELLO world!     - cs.jsrun.net ");

    }
}