Common JS Regular classification

Source: Internet
Author: User
Tags alphabetic character

//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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.