一些不常用的正则

// 长度2-7字母和数字
        // var FlightId = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{1,8}$/;
        // 长度4
        // var Departure = /^([0-9]{4})$/;
        // 长度4
        // var Destination = /^([0-9]{4})$/;
        // 格式RRRR雷达代码???长度4
        // var SSR = /^([0-9]{4})$/;
        // 长度大于1 没有空格和.
        // var reb = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z][^ ]{1,99}$/;
        // xxx.xxx 
        // var NextFeq = /^(\d+){3}\.(\d+){3}$/;
        // 单一大写字母
        // var reb = /^[A-Z]{1,1}$/;
        //RUNWAY 长度2/3
        // var RUNWAY = /^(\d{2})([0-9]|[R,L,C]){1}$/;
        // var RUNWAY_D = /^([0-9]{2})$/;
        // if (!reb.test(clibAtm) && !RUNWAY.test(clibAtm)) {
        //     alert(reb.test(clibAtm))
        //     top.layer.msg("不正确", {
        //         time: 1000,
        //         icon: 6
        //     });
        // } 
        // else {
        //     top.layer.msg("正确", {
        //         time: 1000,
        //         icon: 6
        //     });
        // }
        //长度为4不足补0
        // var num = $("#clibAtm").val();
        // var length = 4;
        // if (num.length < 4) {
        //     for (var len = (num + "").length; len < length; len = num.length) {
        //         num = num + "0";

        //     }
        //     console.log(num)
        // } else {
        //     console.log(num)
        // }

猜你喜欢

转载自blog.csdn.net/wangjunren1/article/details/100556135