
08-08-2010, 07:37 PM
|
|
|
Join Date: Nov 2009
Posts: 176
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by ConfusedCartman
Just a note: I spent the last few hours fighting to find a good regex to use for user registration, and came up with this:
Code:
^((?!admin|moderator)[A-Za-z0-9 ._-])+$
Since vBulletin does not allow Illegal User Names and Regular Expressions to be used together, you can add multiple phrases in the first portion (separated with a "|" character) that you do not want users to be able to use anywhere in their username (or as their username). The second portion checks for all characters valid in a wiki. Slashes and other characters are excluded because they cause problems, but periods, underscores, dashes, and spaces are all allowed along with alphanumeric characters. I've already tested it live and it works just fine - it's a very elegant solution. I find it preferable to the suggestion in the included pdf, since it allows for more breadth to the usernames and still allows us to customize phrases we don't want allowed as well.
|
you could allow more chars
see http://meta.wikimedia.org/wiki/Page_name for details
and there is a problem:
Quote:
The first character of a page name cannot be a colon ( , space ( ), or underscore (_).
|
|