Introduction to Regular Expressions (Microsoft)--8. Special characters

Source: Internet
Author: User
Special characters
There are a number of metacharacters that require special processing when trying to match them. To match these special characters, you must first escape the characters, which means that you use a backslash () earlier. These special characters and their meanings are given in the following table:
Special Character description
$ matches the end position of the input string. If you set the Multiline of the RegExp object
Property, the $ also matches the ' or '. To match the $ character itself, use $.
() marks the start and end position of a subexpression. The subexpression can be obtained for later use.
To match these characters, use (and).
* Match the preceding subexpression 0 or more times. To match the * character, use the *.
+ matches the preceding subexpression one or more times. to match the + character, use the +.
. Matches any single character except a newline character. to match., please use the.
Marks the beginning of a bracket expression. To match [, use [.
? Matches the preceding subexpression 0 or more times, or indicates a non-greedy qualifier. Want to match?
characters, please use?.
Marks the next character as either a special character, or a literal character, or a forward reference, or octal
The escape character. For example, ' n ' matches the character ' n '. ' Matches a newline character. Sequence of ' horses '
With "", and ' ("Match" ().
^ matches the start position of the input string, unless used in a bracket expression, at which point it represents
Does not accept the character set combination. To match the ^ character itself, please use ^.
{marks the beginning of a qualifier expression.} To match {, use the {.
| Indicates a choice between two items. to match |, use |.

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.