正则表达式的使用
摘要:
using System.Text.RegularExpressions; private string pattern = @"^[0-9]*$"; private void textBox1_TextChanged(object sender, TextChangedEventArgs e) { Match m = Regex.Match(this.textBox1.Text, pattern); if (!m.Success) { this.textBox1.Text = resultVal; // this.textBox1.SelectionStart = thi 阅读全文
posted @ 2012-03-21 10:46 Juneson 阅读(111) 评论(0) 推荐(0) 编辑