文章列表
<script>
function isIP(ip, str)
{
var reg = /^\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b$/;
if (!reg.test(ip)) {
alert(str);
return false;
}
return true;
}
isIP(&q ...
- 2009-11-27 16:56
- 浏览 949
- 评论(0)
CREATE OR REPLACE FUNCTION checkMsisdn (msisdn IN VARCHAR2)
RETURN INT
IS
v_regstr Varchar2(2000):='^(150|151|152|158|159|13[4-9]{1})[0-9]{8}$';
Begin
/*
wzh 20091124 验证 手机号码是否是移动号码
*/
IF REGEXP_LIKE (msisdn, v_regstr)
THEN
RETURN 1;
...
CREATE OR REPLACE FUNCTION checkphone (phone IN VARCHAR2)
RETURN INT
IS
v_regstr Varchar2(2000):='^((\(\d{2,3}\))|(\d{3}\-))?(\(0\d{2,3}\)|0\d{2,3}-)?[1-9]\d{6,7}(\-\d{1,4})?$';
Begin
/*
wzh 20091124 验证 固定电话 如0523-83828999
*/
IF REGEXP_LIKE (phone, v_regstr)
...
- 2009-11-24 21:12
- 浏览 1249
- 评论(0)
CREATE OR REPLACE FUNCTION fn_checkidcard (p_idcard IN VARCHAR2)
RETURN INT
IS
v_regstr VARCHAR2 (2000);
v_sum NUMBER;
v_mod NUMBER;
v_checkcode CHAR (11) := '10X98765432';
v_checkbit CHAR (1);
v_areacode VARCHAR2 (2000)
:= '11,12,13,14,15 ...
- 2009-11-24 19:25
- 浏览 1198
- 评论(0)