检查名称是否看起来像“人类"?

编程入门 行业动态 更新时间:2024-10-20 03:30:28
本文介绍了检查名称是否看起来像“人类"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个认真的在线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.

更多推荐

检查名称是否看起来像“人类"?

本文发布于:2023-11-13 00:41:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1582934.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:人类   名称   quot

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!