Reputation: 6030
I want a easy solution to get part of string in C#.
The string structure is like C++ blocks.
class aaa{ void bbb(){ ccc {...} text1 } text2}
The string I want is to get a specified block of code like following.
string.blocks.second() :
which should return :
{ ccc {...} text1 }
Upvotes: 1
Views: 112
Reputation: 21485
Since you are talking about source code, you should look at C-like language parsers. They are discussed here: Parser for C#
Upvotes: 4