What is the Regular Expression to find the strings starting with [ and ending with ]. Between [ and] all kind of character are fine.
^\[.*\]$
will match a string that starts with [ and ends with ]. In C#:
foundMatch = Regex.IsMatch(subjectString, @"^\[.*\]$");
If you're looking for bracket-delimited strings inside longer strings (e. g. find [bar] within foo [bar] baz), then use
\[[^[\]]*\]
In C#:
MatchCollection allMatchResults = null;
Regex regexObj = new Regex(@"\[[^[\]]*\]");
allMatchResults = regexObj.Matches(subjectString);
Explanation:
\[ # match a literal [
[^[\]]* # match zero or more characters except [ or ]
\] # match a literal ]