Discord 标签正则表达式验证 Google 表单

Discord tag regular expression validation Google Forms

有什么方法可以在 Google 表单中使用正则表达式来检查他们的输入是否与 Discord 标签的模式相匹配?我已经尝试过这个:#[0-9]{4}$,但这只对以“#”开头后跟 4 个数字的输入有效。我知道这个正则表达式(下一行)适用于 Discord 标签,也许有一种方法可以将其转换为 Google Forms?

中的正则表达式
/^((.+?)#\d{4})/

Discord 标签由用户名后跟“#”组成,最后是 4 个数字。几个例子是:

提前致谢!

编辑 (跟随OP的revised question

您还可以使用以下

.+#\d{4}


The Discord Wiki

所述

A "Discord tag" is the combination of a username and their discriminator (a 4-digit number). The tag always appears as username#discriminator.

Google 表单验证不支持所有正则表达式。
在这种情况下,您应该使用的正则表达式 (regex)

.+\d{4}$