在正则表达式方面,我真的是一个n00b.我一直试图在任何地方拆分字符串[----anything inside-----].
string s = "Hello Word my name_is [right now I'm hungry] Julian";
string[] words = Regex.Split( s, "------");
Run Code Online (Sandbox Code Playgroud)
结果将是 "Hello Word my name_is "和" Julian"