I have a string as
event FILE[2]::OnProc {;? Msg("Step2") } event FILE[test]::OnProc {;? Msg("Step3.1.1") }
I would like to split into some parts. the desired output wold be a list as
List
[0]
2
;? Msg("Step2")
[1]
test
;? Msg("Step3.1.1")
As you see the string between []
is the first entry of ith entry of list and the string between {}
is the next entry.
May I ask your help how can I have the desired list?
Update:
I have tried this code but it is not going to be correct.
Regex regex = new Regex(@"event FILE\[(?<type>[^\]]*)\]::OnProc? ?{;(?<msg>[^}]*)}");