gpt4 book ai didi

botframework - Botframework模式通过电子邮件的常规简单正则表达式表达式给我错误

转载 作者:行者123 更新时间:2023-12-04 05:31:50 26 4
gpt4 key购买 nike

我用我的机器人尝试了这种电子邮件模式,但是在Skype上发布时不起作用。它总是拒绝任何正常的有效电子邮件。

[Describe("email "), Prompt(QuestionWhatIsYour)]
[Pattern(@"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$")]
public string Email;


我也试过

[Pattern(@"^[\w!#$%&'*+\-/=?\^_`{|}~]+(\.[\w!#$%&'*+\-/=?\^_`{|}~]+)*((([\-\w]+\.)+[a-zA-Z]{2,4})|(([0-9]{1,3}\.){3}[0-9]{1,3}))$")]

And

^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$


我缺少使模式正常工作的什么?

如果我尝试使用localhost API和BotFramework Channel Emulator进行漫游,则所有表达式都可以正常运行

最佳答案

发生这种情况是因为Skype电子邮件来自以下链接:

{
"type": "message",
"id": "1518201259505",
"timestamp": "2018-02-09T18:34:19.515Z",
"localTimestamp": "2018-02-10T01:34:19.515+07:00",
"serviceUrl": "https://smba.trafficmanager.net/apis/",
"channelId": "skype",
"from": {
"id": "29:1e6pgQhUZAJSct6xsOxTh1160QpUF1CXkZXqD4VRDx9A",
"name": "User"
},
"conversation": {
"id": "29:1e6pgQhUZAJSct6xsOxTh1160QpUF1CXkZXqD4VRDx9A"
},
"recipient": {
"id": "28:62516114-227c-436c-8e55-e7dcf50e7474",
"name": "Bot"
},
"membersAdded": [],
"membersRemoved": [],
"text": "<a href=\"mailto:mail@ukr.net\">mail@ukr.net</a>",
"attachments": [],
"entities": [
{
"type": "clientInfo",
"locale": "en-US",
"country": "US",
"platform": "Windows"
}
],
"channelData": {
"text": "<a href=\"mailto:mail@ukr.net\">mail@ukr.net</a>"
}
}

关于botframework - Botframework模式通过电子邮件的常规简单正则表达式表达式给我错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41949213/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com