匹配并提取字符串中的数据
有人可以帮助我(并更改标题,我想不出)?我需要使用 Pircbot 查找命令,并且我需要它能够读取这样的命令:
!online user
我需要这样做:
something.equalsIgnoreCase("online");
我不知道如何让它能够读取用户 并可能将其导出到变量中?有人可以帮忙吗?
抱歉,如果这真的令人困惑。
Can someone help me (and change the title, I couldn't think of one)? I need to look for a command with Pircbot and I need it to be able to read a command like this:
!online user
And I need to do it with this:
something.equalsIgnoreCase("online");
I have no idea how to do it with it being able to read user with that and possibly export it to a variable? Can anyone help?
Sorry if it's really confusing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以在java中使用 Scanner 类。
You could use Scanner class in java.
这是正则表达式模式的完美案例。
做类似的事情
This is a perfect case for a regular expression pattern.
Do something like