javascript--Regular Expression (REGEXP, String) (not completed)

Source: Internet
Author: User

In JavaScript, the regular expression consists of two parts: the matching pattern text of the regular expression, and the modifier that matches the pattern text;

Modifier:

Modifier Description
I Ignore case
G Perform a global match
M Perform multi-line matching

The matching pattern text includes the following:

Parentheses: Finds characters in a range:

(Red|blue|green)
expression
[abc] any one of the brackets can be
[^abc] /td>
[0-9] number 0-9 can be
One of three

Metacharacters: A character with a special meaning

The
metacharacters description
. finds a single character, in addition to line breaks and line terminators.
\w to find word characters.
\w to find non-word characters.
\d to find numbers.
\d to find non-numeric characters.
\s to find white space characters.
\s to find non-whitespace characters.
\b matches the word boundary.
\b matches non-word boundaries.
\ find NUL characters.
\ n find line breaks.
\f Find a page break.
\ r find a carriage return.
\ t find tabs.
\v to find vertical tabs.
\xxx to find characters that are specified in octal number XXX.
\xdd to find the characters specified in hexadecimal digits dd.
\uxxxx finds Unicode characters that are specified in hexadecimal number xxxx.

javascript--Regular Expression (REGEXP, String) (not completed)

Related Article

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.