日期正则表达式
2006-10-08 15:46
155 查看
^(?=/d)(?:(?!(?:1582(?:/.|-|//)10(?:/.|-|//)(?:0?[5-9]|1[0-4]))|(?:1752(?:/.|-|//)0?9(?:/.|-|//)(?:0?[3-9]|1[0-3])))(?=(?:(?!000[04]|(?:(?:1[^0-6]|[2468][^048]|[3579][^26])00))(?:(?:/d/d)(?:[02468][048]|[13579][26]))/D0?2/D29)|(?:/d{4}/D(?!(?:0?[2469]|11)/D31)(?!0?2(?:/.|-|//)(?:29|30))))(/d{4})([-//.])(0?/d|1[012])/2((?!00)[012]?/d|3[01])(?:$|(?=/x20/d)/x20))?((?:(?:0?[1-9]|1[012])(?::[0-5]/d){0,2}(?:/x20[aApP][mM]))|(?:[01]/d|2[0-3])(?::[0-5]/d){1,2})?$
转自:http://blog.csdn.net/lonz/archive/2005/03/22/326751.aspx
Description: | yyyy/mm/dd hh:MM:ss Datetime for all AD years, including leap years. Javascript safe version of http://regexlib.com/REDetails.aspx?regexp_id=760. Please see that regex for details of what is being checked | |
Matches: | [0008-02-29], [2:34:59 PM], [9999/12/31 11:59 PM] | |
Non-Matches: | [04/04/04], [1:00], [1999/1/32] |
相关文章推荐
- 一个特牛的日期时间判断正则表达式
- 一个特牛的日期时间判断正则表达式
- 【前端】日期正则表达式(转发)
- Javascript 正则表达式验证日期,格式如同"2010-10-08"
- 正则表达式实现将MM/DD/YYYY格式的日期转换为YYYY-MM-DD格式
- 常用正则表达式大全,手机、电话、邮箱、身份证(最严格的验证)、IP地址、网址、日期等,一般前台js验证
- 正则应用之——日期正则表达式
- 常用正则表达式:手机、电话、邮箱、身份证、IP地址、网址、日期等
- javaScript 正则表达式匹配日期
- Javascript 日期时间超强正则表达式
- 用正则表达式检验是否输入日期时间是有效&&&&&& execCommand指令集
- 关于日期的正则表达式
- 利用JavaScript和正则表达式进行丰富的日期判断(给其它项目组的代码,有比较好的编程风格和注释)
- JAVA日期验证 正则表达式,包括润二月
- 最强日期正则表达式
- java正则表达式验证整数、浮点数和日期
- 验证有效 "日期时间" 的正则表达式(已解决闰二月)
- 正则表达式应用(日期正则表达式)
- 日期正则表达式
- 常用正则表达式大全,手机、电话、邮箱、身份证(最严格的验证)、IP地址、网址、日期等,一般前台js验证,来这里就够了...