We have two special characters. The first character can be represented by one bit 0. The second character can be represented by two bits (10 or 11). Now given a string represented by several bits. Return whether the last character must be a one-bit c
项目中遇到客户的需求变化,要验证某个数据的正确性,判断输入的两位字符,第一位是数字16进制的,第二位是I.O.Q.U除外的字母(A到Z). 本来对js不熟练,网上参考了一下js正则验证的规则,使用正则表达式完成了这个验证. function check() { var str = document.getElementById("txtEnglishName").value; var reg=/^[0-9a-fA-F][^IOQU]$/; if (str.length!=2) { my