2位小数正则表达式

项目中有一栏位只能是0.xx 的两位小数。用正则表达式check :^0.[0-9]{2}$.
因为这个栏位非必填,采用asp.net 自带的RegularExpressionValidator在前台Check.RegularExpressionValidator只在有输入的情况下才起作用。
                    <asp:RegularExpressionValidator ID="revTFT" runat="server"  ControlToValidate = "txtTFTAfterThinning" ErrorMessage="*Format error,such as 0.XX"
                     ValidationExpression ="^0.[0-9]{2}$" Display ="Dynamic" >*Format error,such as 0.XX</asp:RegularExpressionValidator></td>
原文地址:https://www.cnblogs.com/andycai/p/1554161.html