c# 使用正则表达式实现以多空格作为分隔符

string str = “AAAA       bbb   shsh               slsls”;
 string[] arrContent = Regex.Split(str , @"\s{1,}");  //split by spaces(one or more)

 

posted @ 2023-11-22 23:31  船长华莱士  阅读(49)  评论(0编辑  收藏  举报