---
title: "正则表达式"
author: "lam"
date: "2008-01-08T12:10:56Z"
tags: []
slug: "untitled"
draft: false
lastmod: "2008-01-08T12:10:56Z"
id: 153951
url: "https://lam.iteye.com/blog/153951"
---

"^\\d+$"　　//非负整数（正整数   +   0）     
  "^**$"　　//正整数     
  "^((-\\d+)\|(0+))$"　　//非正整数（负整数   +   0）     
  "^-**$"　　//负整数     
  "^-?\\d+$"　　　　//整数     
  "^\\d+(\\.\\d+)?$"　　//非负浮点数（正浮点数   +   0）     
  "^((+\\.**)|(**\\.+)|(**))$"　　//正浮点数     
  "^((-\\d+(\\.\\d+)?)|(0+(\\.0+)?))$"　　//非正浮点数（负浮点数   +   0）     
  "^(-((+\\.**)|(**\\.+)|(**)))$"　　//负浮点数     
  "^(-?\\d+)(\\.\\d+)?$"　　//浮点数     
  "^+$"　　//由26个英文字母组成的字符串     
  "^+$"　　//由26个英文字母的大写组成的字符串     
  "^+$"　　//由26个英文字母的小写组成的字符串     
  "^+$"　　//由数字和26个英文字母组成的字符串     
  "^\\w+$"　　//由数字、26个英文字母或者下划线组成的字符串     
  "^+(\\.+)*@+(\\.+)+$"　　　　//email地址     
  "^+://(\\w+(-\\w+)*)(\\.(\\w+(-\\w+)*))*(\\?\\S*)?$"　　//url