regular character | describe |
---|---|
\ | Marks the next character as a special character, or a literal character, or a backward reference, or an octal escape character. For example, "N " match character "N ". n " Matches a newline character. Serial \\\ "Match."\ " and " ( "Then match"( ". |
^ | Matches the starting position of the input string. If the Multiline property of the RegExp object is set, ^ also matches " n "Or" r " after that. |
$ | Matches the end position of the input string. $also matches if the Multiline property of the RegExp object is set " n "Or" r " previous location. |
* | Matches the preceding subexpression zero or more times. For example, zo * can match "Z " and "zoo ". * Equivalent to {0,}. |
+ | Matches the preceding subexpression one or more times. For example,"zo+ "Can match"zo " and "zoo "But they don't match."Z ".+ is equivalent to {1,}. |
? | Matches the preceding subexpression zero or once. For example,"do(es)? "Can match"does "Or"does "In"do ".? Equivalent to {0,1}. |
{N) | N Is a non-negative integer. Match determined NTimes. For example, "o{2) " Can't match "Bob "In"o " but can match "Food "two o." |
{N,} | N Is a non-negative integer. Matches at least NTimes. For example, "o{2,} " can't match "Bob "In"o " but can match "foooood " all o."O {1,} "Equivalent to"O + ".O {0,} "Is equivalent to"O * ". |
{N,m) | mandNBoth are non-negative integers, whereN< =mLeast matchNsecond and most matchesmTimes. For example, "O {1,3) "Will match"FOOOOD "The first three o's in."O {0,} 1) "Equivalent to"O? ". Please note that there can be no spaces between commas and two numbers." |
? | When the character immediately follows any other restrictor (*,+,?,{N,}, {N,}, {N,m}) Later, the matching pattern is non-greedy. The non-greedy pattern matches as few strings as possible, while the default greedy pattern matches as many strings as possible. For example, for string "Oooo ",O +? "Will match a single"o "And"O + "Will match all"o ". |
. | Match except ".\ N Any single character other than ". To match include"\ N "အသုံးပြုခြင်း အကျိုးစရာ ကို တွေ့ရသည်၊ အမှတ်အသား(. | n) "ဆိုခဲ့သော စနစ်" |
(Pattern) | တွေ့ရသော ပုံစံ ဖြစ်သည် နှင့် တွေ့ရသော အချက်အလက် သုံးစွဲ သို့မဟုတ် အသုံးပြုခြင်း 9 dollars အချက်အလက် တွင် JScript တွင် အသုံးပြုခြင်း ဖြစ်သည်၊ ပထဝီအရာ စကားလုံး တွေ့ရသော အချက်အလက် ( "Or") ". |
(?: ပုံစံ) | တွေ့ရသော ပုံစံ ဖြစ်သည် သို့မဟုတ် တွေ့ရသော အချက်အလက် သုံးစွဲ-တွေ့ရသော အချက်အလက် ဖို့ အသုံးပြုခြင်း မရှိ ဖြစ်သည်၊ အသုံးပြုခြင်း မရှိ ဖြစ်သည်၊ အသုံးပြုခြင်း(|) "ပုံစံအပိုဒ်များကို ပေါင်းစပ်ခြင်း အသုံးပြုခြင်း အကျိုးစရာရှိ၊ အမှတ်အသား အမျိုးအစားindustr(?: y | ies) "တူညီခြင်း သာ"လုပ်ငန်းများ | လုပ်ငန်းများ "ပိုမို ရုပ်သုံး အကြောင်းပြခြင်း" |
(?= ပုံစံ) | အချက်အလက် မဖြင့် ရှာဖွေသည်၊ အမည်းအမြတ် ပုံစံကို တွေ့ရသော အစ်စ်စ်စ် စကားလုံး၏ အစားထိုးဖော်ပြခြင်း ဖြစ်သည်။ ဤသည် အသုံးမပြု-တွေ့ရသော အချက်အလက် ဖို့ အသုံးပြုခြင်း မရှိ၊ အမှတ်အသား ဖို့ အသုံးပြုခြင်း မရှိ၊ အမှတ်အသား ဖို့Windows (? = 95 | 98 | NT | 2000) "Can match"Windows 2000 "In"Windows "But they don't match."Windows 3.1 "In"Windows ". Pre-ရှာဖွေမှု စကားလုံးကို သုံးစွဲခြင်း မရှိ၊ အမှတ်အသား တွေ့ရသော ပြီးနောက် နောက်ဆုံး အစ်စ်စ်စ် စကားလုံး နောက်မှ တစ်ခါတစ်ရံ ရှာဖွေမှု စတင်သည်၊ အသုံးပြု-ရှာဖွေသည်。 |
(?! ပုံစံ) | အချက်အလက်မဖြင့် ရှာဖွေသည်၊ အမည်းအမြတ် ပုံစံကို တွေ့ရသော အစ်စ်စ်စ် စကားလုံး၏ အစားထိုးဖော်ပြခြင်း ဖြစ်သည်။ ဤသည် အသုံးမပြု-fetch match, that is, the match does not need to be fetched for later use. For example "Windows (?! 95 | 98 | NT | 2000) "Can match"Windows 3.1 "In"Windows "But they don't match."Windows 2000 "In"Windows ". 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, "(? < = 95 | 98 | NT | 2000) Windows "Can match"2000Windows "In"Windows "But they don't match."3.1 Windows "In"Windows ". |
(? <! pattern) | A reverse negative precheck is analogous to a forward negative precheck, but in the opposite direction. For example "(? <! 95 | 98 | NT | 2000) Windows "Can match"3.1 Windows "In"Windows "But they don't match."2000Windows "In"Windows ". |
X | y | Matches x or y. For example, "Z | food "Can match"Z "Or"Food ".(Z | f) ood "Then match"Zood "Or"Food ". |
[Xyz] | Character set. Matches any character contained. For example, "[Abc] "Can match"plain "In"A ". |
[^ xyz] | Set of negative characters. Matches any character not contained. For example, "[^ abc] "Can match"plain "In"p ". |
[A-z] | Character range. Matches any character within the specified range. For example, "[A-z] "Can match"A "To."Z Any lowercase alphabetic character in the range. |
^[^ a-z] | Negative character range. Matches any character that is not within the specified range. For example, "^[^ a-z] "Can match anything that is not there"A "To."Z "Any character in the range. |
B | Matches a word boundary, which refers to the position between the word and the space. For example, "Er b "Can match"Never "In"er "But they don't match."Verb "In"er ". |
B | Matches non-word boundaries. "Er B "Can match"Verb "In"er "But they don't match."Never "In"er ". |
Cx | x ဖြစ်သော အန်ကွင်း ကို သတ်မှတ်သည်။ ဥပမာ၊ cM သည် အန်ကွင်း ကို သတ်မှတ်သည်。-M နှင့် စက်တင်ခြင်း ကို သတ်မှတ်သည်။ x အရာ၏ အသုံးပြုသည်။ ဥပမာ၊ cM သည် အန်ကွင်း ကို သတ်မှတ်သည်。-Z နှင့် a-z နှင့် အတူအတိုင်းပြီး၊ အခြား အမှတ် ကို အခြား အမှတ် အဖြစ် အသုံးပြုပါ။C စကားလုံး |
D | နေရာခွဲခြင်း ကို သတ်မှတ်သည်။ [0 နှင့် အတူအတိုင်းပြီး၊ သတ်မှတ်ပါသည်。-9]. |
D | မည်သည့်-နေရာခွဲခြင်း ကို သတ်မှတ်သည်။ [^ 0 နှင့် အတူအတိုင်းပြီး၊ သတ်မှတ်ပါသည်。-9]. |
F | ပြောင်းလဲသော စက်တင်ခြင်း ကို သတ်မှတ်သည်။ x0c နှင့် cL နှင့် အတူအတိုင်းပြီး၊ သတ်မှတ်ပါသည်。 |
n | ပြောင်းလဲသော စက်တင်ခြင်း ကို သတ်မှတ်သည်။ x0a နှင့် cJ နှင့် အတူအတိုင်းပြီး၊ သတ်မှတ်ပါသည်。 |
r | ပြောင်းလဲသော စက်တင်ခြင်း ကို သတ်မှတ်သည်။ x0d နှင့် cM နှင့် အတူအတိုင်းပြီး၊ သတ်မှတ်ပါသည်。 |
s | Matches any whitespace character, including spaces, tabs, page feeds, etc. Equivalent to [ f n r t v]. |
S | Matches any non-whitespace character. Equivalent to [^ f n r t v]. |
t | Matches a tab. Equivalent to x09 and cI. |
V | Matches a vertical tab. Equivalent to x0b and cK. |
W | Matches any word character including an underscore. Equivalent to "[A-Za-z0- 9_] ". |
W | Matches any non-word character. Equivalent to "[^ A-Za-z0- 9_] ". |
XN | matchN, in whichNEscape the value for hexadecimal. the hexadecimal escape value must be a determined two-digit length. For example, " X41 "Match."A ". X041 "Is equivalent to" X04 & 1 ". ASCII encoding can be used in regular expressions.. |
\Num | matchNum, in whichNumIs a positive integer. A reference to the match obtained. For example, "(.) 1 "Matches two consecutive identical characters." |
\N | Identifies an octal escaped value or a backward reference. If\NBefore at leastNAn acquired subexpression, thenNFor backwards reference. Otherwise, ifNIs an octal number (0-7), thenNIs an octal escape value. |
\nm | Identifies an octal escaped value or a backward reference. If\nmAt least beforenmTo obtain a subexpression, thennmIs a backward reference. If\nmAt least beforeNAcquire, thenNFor a follow textmIf none of the previous conditions are satisfied, ifNandmBoth are octal digits (0-7), then\nmWill match octal escape valuesnm. |
\nml | IFNIs an octal number (0-3), andM and lBoth are octal digits (0-7), then match the octal escape valuenmL. |
uN | matchN, in whichNIs a Unicode character represented by four hexadecimal digits. For example, © matches the copyright symbol (©). |
user name | /^ [a - z0 - 9_ -] {3,16} $/ |
---|---|
password | /^ [a - z0 - 9_ -] {6,18} $/ |
Password 2 | (? = ^. {8 ,}$)(?=.* d )(?=.* W +)(?=.*[ A - Z ])(?=.*[ a - z ])(?!.* n). * $ (Consists of numbers/uppercase letters/lowercase letters/punctuation marks, all four must be available, more than 8 digits) |
hexadecimal value | /^ #? ([a-f0-9] {6} | [a-f0-9] {3}) $/ |
E-mail address | /^ ([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] +) + $/orW +([-+.] w +) * @ w +([-.] w +) *. w +([-.] w +) * |
URL | /^ (https ?://)?([ da - z .-]+).([ a - z.] {2,6 })([/ w .-]*)*/?$/ or [A - zA - z ]+://[^ s] * |
IP address | /| 0?) [02 [0-4d | 25 [0-5] | [01? d d?) .) {3}2 [0-4d | 25 [0-5] | [01]? d d?)/ /^((?: 25 [0-5]: ([0 2 [0-4] [0-9] | [01? [0-9] [0-9 ?.){ 3}) 25 [0-5]: ([0 2 [0-4] [0-9] | [01? [0-9] [0-9?) $/or | 0?) [02 [0-4d | 25 [0-5] | [01? d d?) .) {3}2 [0-4d | 25 [0-5] | [01]? d d?) |
HTML tag | /^ < ([a - z ]+)([^<]+)*(?:>(.*)</ 1 > | s +/>)/ or<(.*)(.*)>.*</ 1 >|<(.*) /> |
Remove Code\ Comments | (? <! http: | S)//. * $ |
Match double-byte characters (including Chinese characters) | [^ x00- xff] |
Kanji (character) | [One -] |
Range of Chinese characters in Unicode encoding | /^ [-] + $/ |
Chinese and full-width punctuation marks (characters) | [- -: -, -! - 🥰] |
Date (year-month-day) | ( d {4} | d {2) - ((0? ([1-9]) | (1 [1 | 2)) - ((0? [1-9]) | ([12] ([1-9]) | (3 [0 | 1)) |
Date (Month/Day/Year) | ((0? [1-9] {1}) | (1 [1 | 2))/(0? [1-9] | ([12] [1-9]) | (3 [0 | 1))/( d {4} | d {2) |
hour clock) 24-(( | | 0?) [01 ] |-9]: ([0 2 [0-3)-5] [0-9) |
Chinese mainland fixed telephone number | ( d {4) - | d {3) -)? ( d {8} | d {7) |
Chinese mainland mobile phone number | 1 d {10) |
Chinese mainland zip code | [1-9] d {5) |
Chinese mainland ID number (15 or 18 digits) | D {15} ( d d [0-9xX])? |
Non-negative integer (positive integer or zero) | D + |
positive integer | [0-9] * [1-9] [0-9] * |
negative integer | - [0-9] * [1-9] [0-9] * |
integer | -? d + |
decimal | (-? d +) (. d +)? |
blank line | N s * r or n n (editplus) or ^ [ s S] * n |
QQ number | [1-9] d {4,} |
Words that do not contain abc | B ((?! abc) w) + b |
Match first and last whitespace characters | ^ s * | s * $ |
commonly used by editors | Here are some replacements for special 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 > |
အဆိုပါ ကိုယ်စားပြု စက်တင်ပုံစံ အက္ခရာပြုအုပ် ကြောင်း မှတ်ချက်-အဆိုပါ ကိုယ်စားပြု စက်တင်ပုံစံ အက္ခရာပြုအုပ်-ကိုယ်စားပြု စက်တင်ပုံစံ၊ ကိုယ်စားပြု စက်တင်ပုံစံ အသုံးပြု