---
title: "一些常用的正则表达式(持续添加)"
author: "yancc"
date: "2011-04-02T10:50:37Z"
tags: []
categories: ["编程语言"]
slug: "untitled"
draft: false
lastmod: "2011-04-02T10:50:37Z"
id: 983912
url: "https://yancc.iteye.com/blog/983912"
---

1.时间正则表达式:

```js

function cktime(value){
var str=/^([01]\d|2[01234]):([0-5]\d|60)$/;
alert(str.test(value));
if(str.test(value)){
alert(value);
}

```