HI专家, 我正在用C#做一个Windows应用程序,而且我陷入了验证过程。 我想要检查文本框中的值是否为数字。但有一个条件不仅是数字而且还支持+符号.... 这里我用ahev使用Regx方法......这是下面的示例代码...
Regex.IsMatch(txt_Country_Code.Text.Trim(), ^ [0-9] + $)但现在它只支持数字..我需要,它包括数字也支持+符号.. Plz帮我解决了这个问题.. Thnaks Dileep
解决方案)
但是现在它只支持数字..我需要,它包括数字也支持+符号.. Plz帮助我来解决这个问题.. Thnaks Dileep ^ \\ +?[0-9] +
msdn.microsoft/en-us/library/az24scfc.aspx [ ^ ] 我们这里有一个Regular Expessions论坛。HI Experts, I am Doing a Windows application in C#, And i am stuck in a validation process. I want to check the value in a text box is numeric or not. But one condition is Not only the numeric but also it supports "+" sign.... Here i ahev used the Regx method... Here is the below sample code...
Regex.IsMatch(txt_Country_Code.Text.Trim(), "^[0-9]+$")But now it supports only the numbers.. i need , it include the numeric also it suport "+" sign.. Plz help me to solve this problem.. Thnaks Dileep
解决方案 ")But now it supports only the numbers.. i need , it include the numeric also it suport "+" sign.. Plz help me to solve this problem.. Thnaks Dileep
"^\\+?[0-9]+" msdn.microsoft/en-us/library/az24scfc.aspx[^] And we have a Regular Expessions forum here.更多推荐
正则表达式问题....
发布评论