正则表达式变量表达式formate [英] regex valadition expression formate

查看:99
本文介绍了正则表达式变量表达式formate的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi


我遇到了正则表达式验证问题,
我需要以美元格式输入值,例如"$ 9999.99",只应加上数字和美元符号


基本上我已经尝试过但没有用处,因为,我无法抓住这个伙伴,所以请帮助我

我的示例代码是asp.net

但它只适用于数字,而不适用于美元符号,并且只允许使用4个数字,
这是示例代码

hi


i had the problem with the regex validation ,
i need enter the value in the dollers format like "$9999.99",only numbers and the doller symbol should be appered


basically i had tried but no use use because , iam not able to catch this formate so please help me this

my sample code is asp.net

but its working for the numerics and not for the doller symbol and ,it was allowing only 4 numbers only ,
this is the sample code

<asp:RegularExpressionValidator runat="server" id="rexNumber" controltovalidate="txtNumber" validationexpression="^[0-9]{4}$"  errormessage="Please enter a 4 digit number!" />



请帮助我



please help me

推荐答案

9999.99,仅数字和美元符号应加


基本上我已经尝试过但没有用处,因为,我无法抓住这个伙伴,所以请帮助我

我的示例代码是asp.net

但它只适用于数字,而不适用于美元符号,并且只允许使用4个数字,
这是示例代码
9999.99",only numbers and the doller symbol should be appered


basically i had tried but no use use because , iam not able to catch this formate so please help me this

my sample code is asp.net

but its working for the numerics and not for the doller symbol and ,it was allowing only 4 numbers only ,
this is the sample code
<asp:RegularExpressionValidator runat="server" id="rexNumber" controltovalidate="txtNumber" validationexpression="^[0-9]{4}


" errormessage="Please enter a 4 digit number!" />
" errormessage="Please enter a 4 digit number!" />



请帮助我



please help me


尝试:
validationexpression="^\


这篇关于正则表达式变量表达式formate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆