用户名Regex
只接受非空的输入,可由字符,音标,数字,空格,括号等组成, 不能以空格开头.
“^[\p{L}\p{Mn}\p{N}\p{Pc}\p{Po}\p{Ps}\p{Pe}\p{Pd}]+[\p{L}\p{Mn}\p{Zs}\p{N}\p{Pc}\p{Po}\p{Ps}\p{Pe}\p{Pd}]?$”
\p{L} - Allows all letters
\p{Mn} - Allows non-spacing marks including accents and umlauts
\p{Zs} - Allows space separator characters including normal space
\p{N} - Allows all numbers
\p{Ps} - Allows all Open characters such as {, ( and [ but not <
\p{Pe} - Allows all Close characters such as }, ) and ] but not >
\p{Sm} - Allows all math characters
\p{Pc} - represent connection punctuation, such as “_”,
\p{Po} - represent punctuations.
\p{Pd} - Dashes and hyphens.
