Regex reg = new Regex("(-)");
string[] str = reg.Split("one-two-three");
和
Regex reg = new Regex("-");
string[] str = reg.Split("one-two-three");
的區別。
加括號和不加括號有什么區別
輸出分別為:one???????? one
??????????????????????? -??????????? two
???????????????????? ?two??????????three
?????????????????????? ? -
??????????????????? ? three?