Ejemplo n.º 1
0
        public void IsPatternMatchTest()
        {
            RegexExpress regexExpress = new RegexExpress();

            regexExpress.IsMatch(@"D:\test\test0\file.txt\测试文件.txt", @"\w:(\\[\w\d\._]+)+\\");
            // \" 对 " 转义  \\对  \ 转义
            regexExpress.IsMatch(@"D:\test\test0\file.txt\测试文件.txt", "\\w:(\\[^<>:\"/\\|?*]+)+\\");
            //Assert.Fail();
        }
Ejemplo n.º 2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            button1.Visible  = false;
            button2.Visible  = false;
            textBox1.Enabled = false;
            this.Focus();

            /*
             * CascadeDirFiles cascadeDir = new CascadeDirFiles();
             * cascadeDir.GetDirFiles(@"D:\照片");
             */
            //IOTools.CopyFile(@"D:\test\test0\file.txt\测试文件.txt",@"D:\test\test1\测试文件.txt");

            RegexExpress regexExpress = new RegexExpress();

            regexExpress.IsMatch(@"D:\test\test0\file.txt\测试文件.txt", @"\w:(\\[\w\d\._]+)+\\");
            // \" 对 " 转义  \\对  \ 转义
            regexExpress.IsMatch(@"D:\test\test0\file.txt\测试文件.txt", "\\w:(\\[^<>:\"/\\|?*]+)+\\");
        }