Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin-teach 中,使用 QQ 设定带有正则方括号表达式的问题时出现问题 #309

Closed
dragon-fish opened this issue Jul 25, 2021 · 1 comment
Assignees
Labels
bug BUG

Comments

@dragon-fish
Copy link
Member

Describe the bug

方括号表达式中的 []似乎未转义。

To Reproduce

假定 teach 前缀为 ?!

使用以下指令设定问题:?! ^有人说[::](.+) 谁说过$1? -x

使用以下句子无法触发回答:有人说:Shigma 女装

Expected behavior

bot 回答:谁说过Shigma 女装?

Additional context

数据库 document:

{
    "_id": 184,
    "flag": 2,
    "answer": "谁说过$1?",
    "question": "^有人说[::](.+)",
    "original": "^有人说[::](.+)",
    "groups": ["onebot:xxx"],
    "probS": 1,
    "probA": 0,
    "predecessors": [],
    "startTime": 0,
    "endTime": 0,
    "writer": "xxx"
}

Versions

  • OS: Windows Server 2016
  • Node Version:14.x
  • OneBot: v1.0.0-beta4
  • koishi: ^3.12.3
  • plugin-teach: ^2.2.1
@dragon-fish
Copy link
Member Author

另注:Discord 中未遇到类似问题

@shigma shigma closed this as completed in ce19057 Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug BUG
Projects
None yet
Development

No branches or pull requests

2 participants