I think that title may sound vague, but please do continue reading to understand what I mean.
Let's say I have this string:
TestBlock1 { NestedBlock1.1 {
Text = Text } }
TestBlock2 { NestedBlock2.1 {
Text = Text } NestedBlock2.2 {
Text = Text } }
I want to be able to match the string by BlockName{...}. This is what I have tried:
[\w]+\s*{\s*[^.]+\s*}
The idea is to get the matches into an array.
string[] block;
block[0] = TestBlock1 { NestedBlock1.1 { Text = Text } }
block[1] = TestBlock2 { NestedBlock2.1 { Text = Text } NestedBlock2.2 { Text = Text } }
The problem is that it gets the whole string. Is it even remotely possible of getting a string between two characters that also contains the "delimiter" characters?