c# 正则表达式 删除字符串前后端的空格

 string s = Regex.Replace(" abra ", @"^\s*(.*?)\s*$", "$1");

            this.textBox2.Text = s; 

猜你喜欢

转载自blog.csdn.net/az44yao/article/details/108334266
今日推荐