Special characters in regular expressions
Character implication
\ As a turn, that is, the characters usually after "\" are not interpreted in the original sense, such as the/b/matching character "B", when B is preceded by a backslash/\b/, to
Common characters
A common character consists of all the print and non-print characters that are not explicitly specified as metacharacters. This includes all uppercase and lowercase letter characters, all numbers, all punctuation marks, and some
Ordinary characters
Normal characters are made up of all print and nonprinting characters that are not explicitly specified as metacharacters. This includes all uppercase and lowercase alphabetic characters, all numbers, all punctuation marks, and
Regular expression metacharacters and normal characters:According to regular expression syntax rules, the matching pattern of regular expressions is composed of a series of characters.
I. Ordinary characters:
Most characters can only describe
Introduction
A regular expression (Regular Expression) describes a feature using a "string", and then verifies whether another "string" matches this feature. For example, if the expression "AB +" describes the features of "a" and any 'B' ", 'AB',
Introduction
A regular expression (Regular Expression) describes a feature using a "string", and then verifies whether another "string" matches this feature. For example, if the expression "AB +" describes the features of "a" and any 'B' ", 'AB',
The checksum is all made up of numbers
Funtin Isigit (s) {var patrn=/^[0-9]{1,20}$/; if (!patrn.x (s)) Rturn Fals Rturn Tru}
Javasript Form validation mail to determine whether an input is mailbox mail and implemented through regular expressions.
1. Regular Expression rules 1.1 common characters
Letters, numbers, Chinese characters, underscores, and punctuation marks not defined in the subsequent sections are all "common characters ". A common character in an expression. It matches the same
Introduction
The regular expression describes a string matching mode. It can be used to: (1) check whether a string contains a child string that complies with a specific rule and obtain the child string; (2) flexibly replace strings according to
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.