检查名称是否看起来像“人类"? [英] check if a name seems "human"?

查看:88
本文介绍了检查名称是否看起来像“人类"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个认真的在线RPG游戏.最近,我遇到了用户使用假名称(只是一堆不同的字母)制作假字符的问题.像Ghytjrhfsdjfnsdms,Yiiiedawdmnwe,Hhhhhhhhhejejekk.我强迫他们改名,但事情变得太多了. 我该怎么办?

I have an online RPG game which I'm taking seriously. Lately I've been having problem with users making bogus characters with bogus names, just a bunch of different letters. Like Ghytjrhfsdjfnsdms, Yiiiedawdmnwe, Hhhhhhhhhhejejekk. I force them to change names but it's becoming too much. What can I do about this?

我能以某种方式检查一下,以便至少彼此不能使用两个以上相同的字母吗?而且也可能包含元音

Could I somehow check so at least you can't use more than 2 of the same letter beside each other?? And also maybe if it contains vowels

推荐答案

我建议您将精力集中在构建用户界面上,以使脑筋急转弯轻松地向管理员列出所有新名称,并且是一个庞大的力量"重命名"机制,以最大程度地减少管理员的工作量,而不是尝试定义一个令人难以置信的复杂且变化多样的规则来命名(并编程一个正则表达式来匹配它们!).

I would recommend concentrating your energy on building a user interface that makes it brain-dead easy to list all new names to an administrator, and a big fat "force to rename" mechanism that minimizes the admin's workload, rather than trying to define the incredibly complex and varied rules that make a name (and program a regular expression to match them!).

更新-不过,我想到了一件事:第二人生"曾经允许您自由指定名字(也许他们不检查名字数据库,我不知道)并且然后为您提供数百种预定义的姓氏供您选择.对于在线角色扮演游戏,这可能已经足够.

Update - one thing comes to mind, though: Second Life used to allow you to freely specify a first name (maybe they check against a database of first names, I don't know) and then gives you a selection of a few hundred pre-defined last names to choose from. For an online RPG, that may already be enough.

这篇关于检查名称是否看起来像“人类"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆