//Defining Regular Expressions//title, can only be the beginning of a numeric alphabetic character, cannot end with an underscore, does not contain special characters 3-20vartitle =/^ (?! _)(?!. *?_$) [) (\sa-za-z0-9_\u4e00-\u9fa5\uff08\uff09]{3,20}$/;varRoleName =/^[\u4e00-\u9fa5]{3,20}$/;//PasswordvarPasswordreg =/^[a-za-z0-9]{6,20}$/;//real namevarRealnamereg =/^[a-za-z0-9\u4e00-\u9fa5]+$/;//Title Validation RegularvarTitletopicreg =/^[\sa-za-z0-9_\u4e00-\u9fa5\uff08\uff09#--]{3,20}$/;//Titlereg, can only be the beginning of a numeric alphabetic character, cannot end with an underscore, does not contain special characters 0-20varTitlereg =/^ (?! _)(?!. *?_$) [\sa-za-z0-9_\u4e00-\u9fa5]{3,20}$/;//remarks RegvarRemarkreg =/^[a-za-z0-9\s\u4e00-\u9fa5]{0,20}$/;//source of information, only letters and kanji spacesvarResource =/^[a-za-z\s\u4e00-\u9fa5]{3,100}$/;//categoryvarCategoryreg =/^[a-za-z\s\u4e00-\u9fa5]{0,100}$/;//ISBN, International Standard ISBNvarISBN =/^\d{13}$/;//letter, Chinese, SpacevarAuthor =/^[a-za-z\s\u4e00-\u9fa5]{0,20}$/;//Verify IPvarips=/(?:(? : 25[0-5]|2[0-4]\d| [01]?\d?\d] \.) {3} (?: 25[0-5]|2[0-4]\d| [01]?\d?\d])/;//Verify account Formatvaruser=/^[a-za-z0-9;] +$/;functionIsEmpty (value) {if(Value = = "" | | Value = =NULL){ return false; }Else{ return true; }}
Common JS Regular classification