Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想要一个简单的解决方案来获取 C# 中的字符串的一部分。 字符串结构类似于 C++ 块。
class aaa{ void bbb(){ ccc {...} text1 } text2}
我想要的字符串是获取指定的代码块,如下所示。
string.blocks.second() : 应该返回: { ccc {...} text1 }
string.blocks.second() :
{ ccc {...} text1 }
由于您在谈论源代码,因此您应该查看类似 C 的语言解析器。它们在这里讨论:C#的解析器
我有这个 ant talk 将 cgi-dir 复制到 cgi-dest。
<exec executable="cp" failonerror="yes"> <arg value="-a" /> <arg value="${cgi-dir