17种正则表达式

 "^\\d+contentquot;  //非负整数(正整数 + 0)
  "^[0-9]*[1-9][0-9]*contentquot;  //正整数
  "^((-\\d+)|(0+))contentquot;  //非正整数(负整数 + 0)
  "^-[0-9]*[1-9][0-9]*contentquot;  //负整数
  "^-?\\d+contentquot;    //整数
  "^\\d+(\\.\\d+)?contentquot;  //非负浮点数(正浮点数 + 0)
  "^(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*))contentquot;  //正浮点数
  "^((-\\d+(\\.\\d+)?)|(0+(\\.0+)?))contentquot;  //非正浮点数(负浮点数 + 0)
  "^(-(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*)))contentquot;  //负浮点数
  "^(-?\\d+)(\\.\\d+)?contentquot;  //浮点数
  "^[A-Za-z]+contentquot;  //由26个英文字母组成的字符串
  "^[A-Z]+contentquot;  //由26个英文字母的大写组成的字符串
  "^[a-z]+contentquot;  //由26个英文字母的小写组成的字符串
  "^[A-Za-z0-9]+contentquot;  //由数字和26个英文字母组成的字符串
  "^\\w+contentquot;  //由数字、26个英文字母或者下划线组成的字符串
  "^[\\w-]+(\\.[\\w-]+)*@[\\w-]+(\\.[\\w-]+)+contentquot;    //email地址
  "^[a-zA-z]+://(\\w+(-\\w+)*)(\\.(\\w+(-\\w+)*))*(\\?\\S*)?contentquot;  //url

Copyright ?2005-2008 All rights reserved. www.17zixue8.com 版权所有    赣ICP备07501614号        完美兵团会员待遇说明    站主QQ:335759285