You want to use the Match.Groups property . Since you already use parentheses, you can get the desired group with
MessageBox.Show(mtch.Groups[1].Value);
Groups [0] will contain the entire line with [and].
Also, I think your regex could be simplified
\[((\s*?.*?)*?)\]
should be equivalent
\[(.*?)\]
as. * will match anything, including a space, which is.
source
share