摘要: operator 关键字用于在类或结构声明中声明运算符。运算符声明可以采用下列四种形式之一: public static result-type operator unary-operator ( op-type operand )public static result-type operator binary-operator (op-type operand,op-type2 operand... 阅读全文
posted @ 2008-12-04 16:34 cindymeng 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 只能输入数字:"^[0-9]*$"。只能输入n位的数字:"^\d{n}$"。只能输入至少n位的数字:"^\d{n,}$"。只能输入m~n位的数字:。"^\d{m,n}$"只能输入零和非零开头的数字:"^(0|[1-9][0-9]*)$"。只能输入有两位小数的正实数:"^[0-9]+(.[0-9]{2})?$"。只能输入有1~3位小数的正实数:"^[0-9]+(.[0-9]{1,3})?$"。只能输... 阅读全文
posted @ 2008-12-04 16:05 cindymeng 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 在编写处理字符串的程序或网页时,经常会有查找符合某些复杂规则的字符串的需要。正则表达式就是用于描述这些规则的工具。换句话说,正则表达式就是记录文本规则的代码。 阅读全文
posted @ 2008-12-04 15:19 cindymeng 阅读(277) 评论(0) 推荐(0) 编辑