zoukankan      html  css  js  c++  java
  • asp.net 用正则表达式验证数字

    非负整数(正整数   +   0)   
    [^\d+$]  

    正整数                                    
    [^[0-9]*[1-9][0-9]*$]      

    非正整数(负整数   +   0) 
    [^((-\d+)|(0+))$]                 

    负整数   
    [^-[0-9]*[1-9][0-9]*$]     

    整数 
    [^-?\d+$]              

    非负浮点数(正浮点数   +   0)   
    [^\d+(\.\d+)?$]   

    正浮点数   
    [^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$]   

    非正浮点数(负浮点数   +   0)   
    [^((-\d+(\.\d+)?)|(0+(\.0+)?))$]   

    负浮点数   
    [^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$]   

    浮点数   
    [^(-?\d+)(\.\d+)?$]

  • 相关阅读:
    错误处理
    触发器
    存储过程
    用户自定义函数
    动态 SQL
    临时表
    游标
    流程控制元素
    锁定和阻塞
    Spring内置事件以及自定义事件
  • 原文地址:https://www.cnblogs.com/huangchuansen/p/3213831.html
Copyright © 2011-2022 走看看