C#里所用的正则表达式,如果要提取字符串里的子匹配项(我都不知道那个叫啥名字,别名?)是很方便的,比如: Regex rx = new Regex(@"<title>(?<title>[\s\S]+)?</title>", RegexOptions.Compiled | RegexOptions.IgnoreCase); Match m = rx.Match(content); if (m.Success) { string title = m.Re
命令格式: grep pattern [file...] When grep encounters a "pattern" in the file, it prints out the lines containing it. 也就是说,grep 命令的功能是,如果 file 中存在于 pattern 匹配的项,则输出.举例说明: ls /bin /usr/bin | sort | uniq | grep zip 会得到如下结果: bunzip2 bzip2 gunzip gzip u