Introduction to regular expressions in javascript learning notes (11) _ basic knowledge
Source: Internet
Author: User
Introduction to regular expressions in javascript learning notes. For more information, see 1. modifier.
. Any character
* Match * The first 0 or multiple characters
+ Match + the first or more characters
? Matching? First 0 or 1 Character
^ Start with a character after ^
$ Ends with a character before $
[] Match a character in []
() Group, which can be extracted with \ 1 \ 2
[^] Character other than matching ^
There are n characters before {n}, and n is a positive number.
Before {n ,}{ n ,}, there must be at least n characters, and n is a positive number.
The characters before {n, m} {n, m} Are n ~ M, n, m is positive
2. Character
\ D a number
\ D a non-digit
\ W a letter or number
\ W one non-letter and non-digit
\ S a blank character
\ S a non-blank character
\ B word boundary
\ B Non-word boundary
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.