CodePudding user response:
Want to use for regular balanceCodePudding user response:
([^ ()] +)CodePudding user response:
String ch="fdsfdsa (FDS) DSFDS";
MatchesSection (ch, false);
Public static ListMatchesSection (string ch, bool isInclude)
{
String strRegex=isInclude? @ (\ "(\ [^ \] *)" : @ "(? <=\ [^ \] () + ";//
MatchCollection Matches=Regex Matches (ch, strRegex, RegexOptions IgnoreCase);
ListSTR=new List (a);
Foreach (Match NextMatch in Matches)
{
STR. The Add (NextMatch. Value);
}
return str;
}
https://blog.csdn.net/u013010499/article/details/103250879