Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
string str = " some string ||^^ another string ||^^ shorter string
如何使用正则表达式解析 str 与模式 ||^^
要拆分这个:
string str = " some string ||^^ another string ||^^ shorter string";
你可以使用这个正则表达式:
string[] lines = Regex.Split(str, @"\|\|\^\^");
string[] lines = Regex.Split(str, "@"\|\|\^\^");