亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

首頁 > 編程 > regex > 正文

javascipt 正則表達式英文版

2020-01-20 22:19:12
字體:
來源:轉載
供稿:網友
1. Regular-expression literal characters Character Matches
Alphanumeric character Itself
/0 The NUL character (/u0000)
/t Tab (/u0009)
/n Newline (/u000A)
/v Vertical tab (/u000B)
/f Form feed (/u000C)
/r Carriage return (/u000D)
/xnn The Latin character specified by the hexadecimal number nn; for example, /x0A is the same as /n
/uxxxx The Unicode character specified by the hexadecimal number xxxx; for example, /u0009 is the same as /t
/cX The control character ^X; for example, /cJ is equivalent to the newline character /n
 

2. Regular expression character classes Character Matches

[...] Any one character between the brackets.
[^...] Any one character not between the brackets.
.  Any character except newline or another Unicode line terminator.
/w Any ASCII word character. Equivalent to [a-zA-Z0-9_].
/W Any character that is not an ASCII word character. Equivalent to [^a-zA-Z0-9_].
/s Any Unicode whitespace character.
/S Any character that is not Unicode whitespace. Note that /w and /S are not the same thing.
/d Any ASCII digit. Equivalent to [0-9].
/D Any character other than an ASCII digit. Equivalent to [^0-9].
[/b] A literal backspace (special case).
 
3. Regular expression repetition characters Character Meaning
{n,m} Match the previous item at least n times but no more than m times.
{n,} Match the previous item n or more times.
{n} Match exactly n occurrences of the previous item.
?  Match zero or one occurrences of the previous item. That is, the previous item is optional. Equivalent to {0,1}.
+ Match one or more occurrences of the previous item. Equivalent to {1,}.
* Match zero or more occurrences of the previous item. Equivalent to {0,}.
 
4。 Regular expression alternation, grouping, and reference characters Character Meaning
| Alternation. Match either the subexpression to the left or the subexpression to the right.
(...) Grouping. Group items into a single unit that can be used with *, +, ?, |, and so on. Also remember the characters that match this group for use with later references.
(?:...) Grouping only. Group items into a single unit, but do not remember the characters that match this group.
/n Match the same characters that were matched when group number n was first matched. Groups are subexpressions within (possibly nested) parentheses. Group numbers are assigned by counting left parentheses from left to right. Groups formed with (?: are not numbered.
 
5. Regular-expression anchor characters Character Meaning
^ Match the beginning of the string and, in multiline searches, the beginning of a line.
$ Match the end of the string and, in multiline searches, the end of a line.
/b Match a word boundary. That is, match the position between a /w character and a /W character or between a /w character and the beginning or end of a string. (Note, however, that [/b] matches backspace.)
/B Match a position that is not a word boundary.
(?=p) A positive lookahead assertion. Require that the following characters match the pattern p, but do not include those characters in the match.
(?!p) A negative lookahead assertion. Require that the following characters do not match the pattern p.
 
6. Regular-expression flags Character Meaning
i Perform case-insensitive matching.
g Perform a global matchthat is, find all matches rather than stopping after the first match.
m Multiline mode. ^ matches beginning of line or beginning of string, and $ matches end of line or end of string.
 

string.replace(regexp, replacement)

Characters Replacement
$1, $2, ..., $99  The text that matched the 1st through 99th parenthesized subexpression within regexp
$&  The substring that matched regexp
$'  The text to the left of the matched substring
$'  The text to the right of the matched substring
$$  A literal dollar sign
 
name.replace(/(/w+)/s*,/s*(/w+)/, "$2 $1");
text.replace(/"([^"]*)"/g, "''$1''");
text.replace(//b/w+/b/g, function(word) {
                           return word.substring(0,1).toUpperCase( ) +
                                  word.substring(1);
                         });
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
日韩av免费网站| 久久精品夜夜夜夜夜久久| 亚洲精品久久久一区二区三区| 午夜精品在线观看| 91tv亚洲精品香蕉国产一区7ujn| 欧美视频二区36p| 欧美性猛交视频| 亚洲视频综合网| 国产精品影院在线观看| 欧美成人午夜激情| 91精品久久久久久久久久久久久| 国语自产在线不卡| 欧美理论电影网| 91国产精品视频在线| 亚洲精品视频播放| 国产91对白在线播放| 一本色道久久88综合亚洲精品ⅰ| 国产免费一区二区三区在线观看| 久久久久久久一区二区三区| 国产成人福利网站| 久久精品视频va| 亚洲欧美日韩区| 日韩中文字幕免费看| 亚洲淫片在线视频| 久久久久99精品久久久久| 亚洲精品一区久久久久久| 国产成人短视频| 国产精品久久久久影院日本| 欧美最顶级的aⅴ艳星| 亚洲第一av在线| 欧美午夜片在线免费观看| 欧美精品www在线观看| 一级做a爰片久久毛片美女图片| 精品久久久一区二区| 精品国产乱码久久久久久天美| 久久久人成影片一区二区三区观看| 日韩精品在线观看视频| 亚洲综合国产精品| 欧美色道久久88综合亚洲精品| 日韩欧美成人区| 国产精品久久久久免费a∨大胸| 久久99国产精品自在自在app| 热99精品只有里视频精品| 国产啪精品视频网站| 亚洲黄页网在线观看| 精品久久中文字幕久久av| 亚洲精品99久久久久中文字幕| 亚洲精品一区av在线播放| 91社影院在线观看| 欧美成人免费小视频| 国语自产精品视频在线看抢先版图片| 亚洲国语精品自产拍在线观看| 精品国产网站地址| 欧美精品在线免费观看| 一区二区三区视频免费在线观看| 国产人妖伪娘一区91| 欧美日韩国产丝袜美女| 久久久久久高潮国产精品视| 日韩在线观看精品| 精品夜色国产国偷在线| 欧美午夜性色大片在线观看| 秋霞av国产精品一区| 亚洲人成毛片在线播放| 国产日韩在线观看av| 亚洲欧美三级伦理| 国内精品伊人久久| 川上优av一区二区线观看| 国产精品久久久久久久app| 日韩专区中文字幕| 欧美中文字幕在线视频| 日韩精品一区二区三区第95| 欧美日韩福利电影| 国产成人综合精品在线| 日韩av在线一区| 国产剧情日韩欧美| 日本精品一区二区三区在线播放视频| 国模私拍视频一区| 一本一道久久a久久精品逆3p| 成人黄色影片在线| 亚洲性69xxxbbb| 成人av在线天堂| 色偷偷9999www| 欧美性高跟鞋xxxxhd| 性日韩欧美在线视频| 欧美高清电影在线看| 亚洲视频999| 91久久国产精品91久久性色| 午夜精品一区二区三区在线播放| 亚洲国产日韩一区| 国产在线精品成人一区二区三区| 欧美专区日韩视频| 亚洲影视九九影院在线观看| 精品在线观看国产| 日韩精品在线播放| 国产精品视频免费在线| 久久精品国产成人精品| 欧美日韩在线第一页| 日韩精品小视频| 亚洲一区二区黄| 日韩福利伦理影院免费| 亚洲美女动态图120秒| 都市激情亚洲色图| 亚洲第一中文字幕| 亚洲天堂av在线免费| 日日狠狠久久偷偷四色综合免费| 国产精品啪视频| 久久成人av网站| 亚洲午夜未满十八勿入免费观看全集| 久久国产精品电影| 国外视频精品毛片| 国产日韩精品一区二区| 久久精品中文字幕一区| 久久69精品久久久久久久电影好| 中文字幕日韩高清| 欧美日韩国产一区中文午夜| 日韩精品中文字幕在线观看| 欧美黄色小视频| 国产精品黄页免费高清在线观看| 午夜精品久久久久久久男人的天堂| 91免费人成网站在线观看18| 国产九九精品视频| 国产一区二区日韩精品欧美精品| 伊人精品在线观看| 国产精品国产三级国产专播精品人| 成人国产精品av| 日韩视频永久免费观看| 久久天天躁狠狠躁夜夜爽蜜月| 久久精品99久久久久久久久| 成人免费视频xnxx.com| 亚洲激情第一页| 国产精欧美一区二区三区| 81精品国产乱码久久久久久| 国产日韩精品在线| 日本国产一区二区三区| 中文字幕国产亚洲2019| 亚洲欧美国产日韩中文字幕| 欧美黑人巨大精品一区二区| 亚洲精品中文字| 亚洲福利视频网| 精品久久久久久国产91| 国产一区二区日韩| 中文字幕日韩av综合精品| 国产精品爽爽爽爽爽爽在线观看| 欧美在线一区二区三区四| 久久综合久中文字幕青草| 日韩视频欧美视频| 国产欧美精品在线播放| 精品视频一区在线视频| 91欧美精品成人综合在线观看| 日韩中文字幕亚洲| 97视频在线观看成人| 91在线国产电影| 国产精品久久999| 久久91亚洲人成电影网站| 日韩成人av在线播放| 亚洲精品动漫100p| 国产精品精品久久久久久| 亚洲成年人在线播放| 日韩在线观看成人| 国产精品18久久久久久首页狼| 欧美激情在线观看视频| 日韩欧美成人免费视频| 国产精品一区二区三区免费视频| 日韩欧美精品网址|