Simple Regular Expression application _ only include _
Source: Internet
Author: User
Varreg/(\ w + [_ & amp;] + $) | ([_ & amp;] + \ w + $) | (^ [A-Za-z0-9] + $ )/; if (! Reg. test (value_name) {// TODO .............} www.2cto.com/(\ w + [_ & amp;] + $) | ([_ & amp;] + \ w + $) | (^ [A-Za-z0-9 var reg =/(\ w + [_ &] + $) | ([_ &] + \ w + $) | (^ [A-Za-z0-9] + $)/; if (! Reg. test (value_name) {// TODO .............} www.2cto.com/(\ w + [_ &] + $) | ([_ &] + \ w + $) | (^ [A-Za-z0-9] + $) /// it is used to generate a String str = "sss" equivalent to java; double quotation marks \ w can only be numbers and letters, case-insensitive [_ &] underscores and & conformances can both have one + Yes yes (^ [A-Za-z0-9] + $) it is a string that can only start with a number or a letter. + $ is the end, meaning that there cannot be anything else (except numbers and letters, case-insensitive)
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