Js regular expressions match the following rules

Only the following entries are allowed in the

input box:
a) only Chinese characters are allowed:"I love you";
b) 26 English letters are allowed, including uppercase and lowercase
c) spaces. ? ! ;:, () the above characters are all full-width characters, can appear, other characters forbid to enter
d) allow noise symbols [S], [N], [T], [P] to appear, [] can not appear alone, can only be the above four noise symbols.
e) at least one Chinese character or letter (except noise symbol)
f) Arabic numerals are prohibited

Dec.28,2021

clipboard.png


/ ([(?! n | S |])) | ((? 1 < / sup >) / g

< hr >
    < li id= "fn-1" > u4e00-u9fa5 [],.?! ;:, () (?: [N]) (?: [S]) please

/ ^ (?!\ [[SNTP]\] + $) (?! [\ s,.?! ;:, ()] + $) ([I love you] | [A-Za-z] + | [\ s,.?! ;:, ()] + | (\ [SNTP]\) +) + $/

Menu