人生是一场不能存盘的RPG,我只能尽量多搞几个Screenshot

March 9, 2007

用户名Regex

Filed under: Regular Expression

只接受非空的输入,可由字符,音标,数字,空格,括号等组成, 不能以空格开头.
“^[\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.

Comments »

The URI to TrackBack this entry is: http://recordsome.blogsome.com/2007/03/09/p229/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.






















Get free blog up and running in minutes with Blogsome
Theme designed by Hadley Wickham