zoukankan      html  css  js  c++  java
  • 解析空白符(空白,制表)分隔的字串

            /// <summary>
            
    /// 解析空白符(空白,制表)分隔的字串
            
    /// </summary>
            
    /// <param name="strs"></param>
            
    /// <returns></returns>

            public static ArrayList GetStringsSepByBlank(string strs) 
            

                ArrayList ar
    =new ArrayList();
                
                
    //[^\s]+表示1一个以上的非空白符,+至关重要;/s表示空白符;
                Regex re=new Regex(@"[^\s]+\s",RegexOptions.Multiline);    
                Match ma
    =re.Match(strs); 
                
    while(ma.Success)
                
    {
                    ar.Add (ma.Value ); 
                    ma
    =ma.NextMatch();
                }

                
    return ar;
            }
     
  • 相关阅读:
    文件同步工具
    截图工具
    DBF文件工具
    Oracle旗下的开源虚拟机
    远程协助工具
    切换网络IP工具
    MySQL(C#的链接姿势)
    大写URL转小写
    一个textview实现文字在图片上面的效果
    通过代码设置textview颜色
  • 原文地址:https://www.cnblogs.com/jetz/p/232339.html
Copyright © 2011-2022 走看看