备忘:js正则表达式中的元字符

Predefined term Matches
Horizontal tab
 Backspace
v Vertical tab
f Form feed
Carriage return
Newline
cA : cZ Control characters
x0000 : xFFFF Unicode hexadecimal
x00 : xFF ASCII hexadecimal
. Any character, except for newline ( )
d Any decimal digit; equivalent to [0-9]
D Any character but a decimal digit; equivalent to [^0-9]
w Any alphanumeric character including underscore; equivalent to [A-Za-z0-9_]
W Any character but alphanumeric and underscore characters; equivalent to [^A-Za-z0-9_]
s Any whitespace character (space, tab, form feed, and so on)
S Any character but a whitespace character
 A word boundary
B Not a word boundary (inside a word)
原文地址:https://www.cnblogs.com/undefined000/p/5450313.html