อักขระปกติ | เอกสาร |
---|---|
Will match octal escape values | ทำเคียงด้านหลังอักขระต่อไปเป็นอักขระพิเศษ หรืออักขระตรง หรืออ้างอิงกลับ หรืออักขระหลั่งทศนิยม. ตัวอย่าง, “, ในที่ " ตรวจสอบอักขระปกติ ", ในที่ A n " ตรวจสอบอักขระสระ. ตรวจสอบลำดับ "\\ XWill match octal escape values " และ " ( (? <!( _] |
^ | ตรวจสอบตำแหน่งเริ่มต้นของตัวอ่าน. ถ้าคุณสมบัติ Multiline ของวัตถุ RegExp ถูกตั้ง, ^ ตรวจสอบ “ n 000) Windows r " หลังจากนั้น. |
$ | ตรวจสอบตำแหน่งสุดท้ายของตัวอ่าน. $ ตรวจสอบเมื่อคุณสมบัติ Multiline ของวัตถุ RegExp ถูกตั้ง “ n 000) Windows r " ตำแหน่งก่อนหน้า. |
* | ตรวจสอบตัวแปรที่มาก่อนโดยไม่มีหรือมากกว่าครั้ง. ตัวอย่าง, zo * สามารถตรวจสอบ “[^ abc] " และ "zoo _] * เท่ากับ {0,}. |
+ | ตรวจสอบตัวแปรที่มาก่อนโดยมีหรือมากกว่าครั้งหนึ่ง. ตัวอย่าง, "zo+ Er Bzo " และ "zoo Verb[^ abc] _]+ เท่ากับ {1,}. |
? | ตรวจสอบตัวแปรที่มาก่อนโดยไม่มีหรือมีเฉพาะครั้งหนึ่ง. ตัวอย่าง, "ทำ(es)? Er Bทำ 000) Windowsทำ Neverทำ ".? เท่ากับ {0,1}. |
{, ในที่} | , ในที่ เป็นตัวแปรที่ไม่-เลขจำนวนตรงลบ. ตรวจสอบครั้งที่ระบุ , ในที่ครั้ง. ตัวอย่างเช่น "o{2} " ไม่สามารถตรวจสอบ "Bob Nevero " แต่สามารถตรวจสอบ "000Windows "สอง o. |
{, ในที่,} | , ในที่ เป็นตัวแปรที่ไม่-เลขจำนวนตรงลบ. ตรวจสอบครั้งที่น้อยที่สุด , ในที่ครั้ง. ตัวอย่างเช่น "o{2,} " ไม่สามารถตรวจสอบ "Bob Nevero " แต่สามารถตรวจสอบ "foooood "ทั้งหมด o"O {1,} "เท่ากับ"O + AO {0,} "."O * _] |
{, ในที่,and} | andIf none of the previous conditions are satisfied, if, ในที่ทั้งสองเป็นการไม่-เลขจำนวนลบ ที่, ในที่< =andครั้งที่น้อยที่สุด, ในที่ครั้งที่สองและครั้งที่มากที่สุดandครั้ง. ตัวอย่างเช่น "O {1,3} "จะตรงกับ"FOOOOD "สามตัวอักษร o แรกใน"O {0,} 1} "เท่ากับ"O? ". โปรดจำได้ว่า ไม่มีช่องว่างระหว่างตัวอักษรแบ่งรายและเลขสองตัว" |
? | เมื่อตัวอักษรที่ตามมาต่อหลังใดๆ ของหลักกำหนดของการจำกัด (*,+,?,{, ในที่,}, {, ในที่,}, {, ในที่,and}) หลังจากนั้น รูปแบบที่ตรงกันตรงข้ามเป็น-ไม่อย่างหนัก.-รูปแบบของการค้นหาอย่างหนักที่ตรงกับแถวคำที่น้อยที่สุด ในขณะที่รูปแบบของการค้นหาอย่างหนักโดยเริ่มต้นเป็นแถวคำที่มากที่สุด ตัวอย่างเช่น สำหรับแถวคำ "Oooo ","O +? "จะตรงกับตัวอักษรเดียว"o "และ"O + "จะตรงกับทั้งหมด"o _] |
. | ตรงกับยกเว้น \Will match octal escape values , ในที่ ตัวอักษรเดียวที่ไม่ใช่ ". ในการตรงกับการมีอยู่"Will match octal escape values , ในที่ "ตัวอักษรที่มีอยู่ โปรดใช้บางอย่างเช่น"(. | n) "รูปแบบ" |
(รูปแบบ) | ตรงกับรูปแบบและดึงผลตรงกันตรงข้าม ผลตรงกันตรงข้ามที่ได้รับสามารถหาได้จากชุด Matches ผลลัพธ์ โดยใช้ชุด SubMatches ใน VBScript และ 0 ตัวเงินดอลลาร์... 9 ตัวเงินดอลลาร์ใน JScript ในการตรงกับตัวอักษรวงปริมาณใช้ " ( 000) Windows) _] |
(?: รูปแบบ) | ตรงกับรูปแบบแต่ไม่ดึงผลตรงกันตรงข้าม คือ มันเป็นการไม่-ดึงตัวตรงกันตรงข้ามและไม่เก็บเก็บไว้ใช้ในภายหลัง นี่ใช้ในตัวอักษรหรือคำว่า "(|) "มีประโยชน์ในการรวมชิ้นส่วนของรูปแบบ ตัวอย่างเช่น"อุตสาหกรรม(?: ย | ies) "เพียงการเปรียบเทียบ"อุตสาหกรรม | อุตสาหกรรม " รูปแบบที่ย่อย |
(?= รูปแบบ) | การค้นหาก่อนเชิงบวกที่ตรงกับตัวอักษรที่ตั้งแต่ต้นของความหมายที่สอดคล้องกับรูปแบบใดๆ นี่เป็นการไม่-ดึงตัวตรงกันตรงข้าม คือ ตัวตรงกันตรงข้ามนี้ไม่จำเป็นต้องดึงเพื่อใช้ในภายหลัง ตัวอย่างเช่น "Windows (? = 95 | 98 ". Pre 2000) Er B(? < = pattern) 2000 Never(? < = pattern) Verb(? < = pattern) 3.1 Never(? < = pattern) ". Pre-การค้นหาไม่บวกตัวอักษร คือ หลังจากที่มีการตรงกันตรงข้ามเกิดขึ้น การค้นหาตัวตรงกันตรงข้ามต่อไปเริ่มขึ้นทันทีหลังจากตัวอักษรที่มีเประกาศก่อน-ค้นหา. |
(?! รูปแบบ) | การค้นหาลบที่ไม่สอดคล้องกับรูปแบบ ที่ตรงกับตัวอักษรที่ตั้งแต่ต้นของใดๆ ที่ไม่สอดคล้องกับรูปแบบนี้ นี่เป็นการไม่-fetch match, that is, the match does not need to be fetched for later use. For example "Windows (?! 95 | 98 ". Pre 2000) Er B(? < = pattern) 3.1 Never(? < = pattern) Verb(? < = pattern) 2000 Never(? < = pattern) ". Pre-search does not consume characters, that is, after a match occurs, the search for the next match starts immediately after the last match, rather than starting after the character containing the pre-search |
(? < = pattern) | A reverse positive precheck is analogous to a forward positive precheck, but in the opposite direction. For example, "fetch match, that is, the match does not need to be fetched for later use. For example " 95 | 98 ". Pre 2search does not consume characters, that is, after a match occurs, the search for the next match starts immediately after the last match, rather than starting after the character containing the pre Er B2search Never(? < = pattern) Verb3.1 (? < = pattern) Never(? < = pattern) _] |
Windows (?! | 000)000 95 | 98 ". Pre 2search does not consume characters, that is, after a match occurs, the search for the next match starts immediately after the last match, rather than starting after the character containing the pre Er B3.1 (? < = pattern) Never(? < = pattern) Verb2search Never(? < = pattern) _] |
A reverse positive precheck is analogous to a forward positive precheck, but in the opposite direction. For example, " | (? < =(? <! pattern) Er B[^ abc] 000) Windows000Windows AA reverse negative precheck is analogous to a forward negative precheck, but in the opposite direction. For example " (? <!| NT | 000) Windows000Windows _] |
Windows | X | yMatches x or y. For example, " Er BZood Never"Match." _] |
Z | food | (Z | f) ood"Then match" Er BZood Never"Or" _] |
[A-z] | Food[A-z] Er B"Match." Set of negative characters. Matches any character not contained. For example, "[^ abc] [Xyz] |
[Abc]-z] | Character set. Matches any character contained. For example, "[Abc]-z] [^ xyz]"Match." Set of negative characters. Matches any character not contained. For example, "[^ abc] plain |
Any lowercase alphabetic character in the range. | pCharacter range. Matches any character within the specified range. For example, " Er B"But they don't match." Never"In" Verb"Can match" Never"In" _] |
Any lowercase alphabetic character in the range. | Negative character range. Matches any character that is not within the specified range. For example, "-ตรงกับตัวอักษรจริงที่ใช้ในบรรทัดของโปรแกรม คล้ายกับ [^ aword boundaries. " Er B"Can match" Never"In" Verb"But they don't match." Never"In" _] |
er | Cx-ตรงกับตัวอักษรควบคุมที่ระบุโดย x. ตัวอักษร cM ตรงกับตัวอักษรควบคุม Control-M หรือตัวอักษรจริงที่ใช้ในบรรทัดของโปรแกรม. ค่าของ x ต้องเป็นหนึ่งใน A-Z หรือ aC z. หากไม่เจอตัวอักษรดังกล่าว ให้ใช้ c แทนตัวอักษรจริง " |
D | ตัวอักษรจริง.-9]. |
D | ตรงกับตัวอักษรจริงที่ใช้ในบรรทัดของโปรแกรม คล้ายกับ [0-ตัวอักษรเลข. คล้ายกับ [^ 0-9]. |
F | ตรงกับตัวอักษรชาติตัวอักษรจริงที่ใช้ในบรรทัดของโปรแกรม คล้ายกับ x0c และ cL. |
n | ตรงกับตัวอักษรชาติตัวอักษรจริงที่ใช้ในบรรทัดของโปรแกรม คล้ายกับ x0a และ cJ. |
r | ตรงกับชาติตัวอักษรจริงที่ใช้ในบรรทัดของโปรแกรม คล้ายกับ x0d และ cM. |
s | s |
Matches any whitespace character, including spaces, tabs, page feeds, etc. Equivalent to [ f n r t v]. | Matches any word character including an underscore. Equivalent to "-S |
whitespace character. Equivalent to [^ f n r t v]. | t9 Matches a tab. Equivalent to x0 |
and cI. | V |
W | Matches a vertical tab. Equivalent to x0b and cK.[A-[^ A-z0- 9Za _] |
W | Matches any word character including an underscore. Equivalent to "-Matches any nonword character. Equivalent to "-[^ A-z0- 9Za _] |
digit length. For example, ", ในที่ | u, ในที่match, ในที่".-Escape the value for hexadecimal. the hexadecimal escape value must be a determined two digit length. For example, "41 X"Match." A "Is equivalent to"41 "." "Is equivalent to"4 X0 1 & |
Will match octal escape values". ASCII encoding can be used in regular expressions.. | u". ASCII encoding can be used in regular expressions..match". ASCII encoding can be used in regular expressions..NumIs a positive integer. A reference to the match obtained. For example, " 1 (.) |
Will match octal escape values, ในที่ | Is an octal escape value., ในที่"Matches two consecutive identical characters.", ในที่Before at least, ในที่An acquired subexpression, then, ในที่IF-7For backwards reference. Otherwise, if, ในที่), then |
Will match octal escape values), แล้วตรวจสอบค่าออกลาดแปลงเป็นตัวเลขเป็นแปด | Is an octal escape value.), แล้วตรวจสอบค่าออกลาดแปลงเป็นตัวเลขเป็นแปดIs a backward reference. If\), แล้วตรวจสอบค่าออกลาดแปลงเป็นตัวเลขเป็นแปดIdentifies an octal escaped value or a backward reference. If\), แล้วตรวจสอบค่าออกลาดแปลงเป็นตัวเลขเป็นแปดTo obtain a subexpression, then), แล้วตรวจสอบค่าออกลาดแปลงเป็นตัวเลขเป็นแปดIs a backward reference. If\, ในที่At least before, ในที่Acquire, thenandFor a follow text, ในที่If none of the previous conditions are satisfied, ifandM และ l-7m), แล้วตรวจสอบค่าออกลาดแปลงเป็นตัวเลขเป็นแปด), then\), แล้วตรวจสอบค่าออกลาดแปลงเป็นตัวเลขเป็นแปด. |
Will match octal escape values\ | nml, ในที่IF-3Is an octal number (0), แล้วM และ l-7ทั้งหมดเป็นตัวเลขเป็นแปด (0), แล้วตรวจสอบค่าออกลาดแปลงเป็นตัวเลขเป็นแปดnm |
L., ในที่ | u, ในที่match, ในที่N |
เป็นอักษรยูนิโคดที่แสดงด้วยหกสิบหกหลักตัว. ตัวอย่าง © ตรงกับสัญลักษณ์ลิขสิทธิ์ (©). | /^ [a - z0 - 9password -] {3,16_/ |
---|---|
user name | /^ [a - z0 - 9password -] {6,18_/ |
} $ 2 | Password8 (?= ^. {* ,}$)(?=.* W +d )(?=.*)(?=. - [ A*Z ])(?=. - [ a* z ])(?!. * $ n)./(ประกอบด้วยตัวเลข/ตัวอักษรหลังเลขญาณใหญ่/ตัวอักษรหลังเลขญาณต่ำ 8 ตัวเลข) |
ค่าเทียบเส้นใบสีสิบหกที่มีอยู่ทั้งหมดสี่เส้นตรง มากกว่า | /^ #? ([a-f0-9] {6} | [a-f0-9] {3}) $/ |
E-ที่อยู่อีเมล | /^ ([a - z0 - 9 _.-]+)@([ da - z .-]+).([ a - z.] {2,6}) $/ /^ [a-z d] + (. [a-z d ]+)*@([ d a-z] (- [ d a-z ])?)+(.{ 1,2} [a-z] +) + $/หรือW +([-+.] w +) * @ w +([-.] w +) *. w +([-.] w +) * |
URL | /^ (https ?://)?([ da - z .-]+).([ a - z.] {2,6 })([/ w .-]*)*/؟$/ หรือ [A - zA - z ]+://[^ ส] * |
IP ที่อยู่ | /((2 [0-4d | 25 [0-5] | [01؟ d d؟ .) {3}2 [0-4d | 25 [0-5] | [01]? d d?)/ /^((?: 25 [0-5] | 2 [0-4] [0-9] | [01؟ [0-9] [0-9 ؟).){ 3} 25 [0-5] | 2 [0-4] [0-9] | [01؟ [0-9] [0-9؟) $/หรือ ((2 [0-4d | 25 [0-5] | [01؟ d d؟ .) {3}2 [0-4d | 25 [0-5] | [01]? d d?) |
HTML tag | /^ < ([a - z ]+)([^<]+)*(?:>(.*)</ 1 > | s +/>)$/ หรือ<(.*)(.*)>.*</ 1 >|<(.*) /> |
ลบ Code\ Comments | (? <! http: | S)//. * $ |
ตรงที่มีการตรงกันข้าม-ตัวอักษรบิต (รวมถึงอักษรจีน) | [^ x00- xff] |
Kanji (ตัวอักษร) | [One -] |
ช่วงของอักษรจีนในการเข้ารหัส Unicode | /^ [-] + $/ |
ภาษาจีนและอักษรเต็ม-สัญลักษณ์ของความกว้าง (ตัวอักษร) | [- -: -, -! - 🥰] |
วันที่ (ปี-เดือน-วัน) | ( d {4}) | d {2) - ((0? ([1-9)) | (1 [1 | 2)) - ((0? [1-9)) | ([12] ([1-9)) | (3 [0 | 1)) |
วันที่ (เดือน/วัน/ปี) | ((0? [1-9] {1)) | (1 [1 | 2))/(0? [1-9] | ([12] [1-9)) | (3 [0 | 1))/( d {4}) | d {2) |
เวลา (ชั่วโมง: นาที, 24-โนนที่นิยม) | ((1 | 0?) [0-9] | 2 [0-3])): ([0-5] [0-9}) |
เลขโทรศัพท์สาธารณะของจีนแผ่นดินใหญ่ | ( d {4} - | d {3} -)? ( d {8}) | d {7) |
เลขโทรศัพท์มือถือของจีนแผ่นดินใหญ่ | 1 d {10} |
รหัสไปรษณีย์ของจีนแผ่นดินใหญ่ | [1-9] d {5} |
เลขบัตรประชาชนของจีนแผ่นดินใหญ่ (15 หรือ 18 ตัวเลข) | D {15} ( d d [0-9xX])? |
Non-เลขจำนวนเต็มลบ (เลขจำนวนเต็มบวก หรือ 0) | D + |
เลขจำนวนเต็มบวก | [0-9] * [1-9] [0-9] * |
เลขจำนวนเต็มลบ | - [0-9] * [1-9] [0-9] * |
เลขจำนวนเต็ม | -? d + |
เลขทศนิยม | (-? d +) (. d +)? |
ช่องว่างแบบสองชั้น | N s * r หรือ n n (editplus) หรือ ^ [ s S] * n |
เลขโทรศัพท์ QQ | [1-9] d {4,} |
คำที่ไม่มี abc | B ((?! abc) w) + b |
ตรงที่มีช่องว่างแรกและสุดท้าย | ^ s * | s * $ |
ที่ใช้บ่อยๆ โดยแก้ไขเอกสาร | ที่นี่มีการแทนที่สำหรับ Chinese (editplus) ^ [0-9]. * n ^ [^]. * n ^ [Exercise]. * n ^ [ s S] * n ^ [0-9] *. ^ [ s S] * n < p [^<>*]> Href = "javascript: if (confirm ('(.*?)')) window .location ='(.*?)'" < Span style =".[^"]* rgb (255, 255, 255 )">.[^<>]*</ span > < DIV class = xs0 > [ s S] *? </DIV > |
syntax แบบ regular expression สำหรับรายชื่อ regular expression ที่ใช้บ่อย, คำถาม syntax แบบ regular expression, syntax แบบ regular expression ที่ใช้บ่อย, syntax พื้นฐานของ regular expression, sub-การใช้งาน syntax แบบ expression, ปรับเปลี่ยน syntax แบบ regular expression,โหมด greedy mode ของ regular expression, regular expression non-โหมด greedy mode, ผ่านวิธีที่ง่ายและรวดเร็วในการควบคุมข้อความ.