[Skype] Regular expression not working to find email address in chat message?
See original GitHub issueBot Info
- SDK Platform: Node.js
- SDK Version: Bot Builder 3.13.1 with Botkit 0.6.7
- Active Channels: Skype, Messenger, Telegram and Web
- Deployment Environment: Azure Bot Service and Azure App Service
Issue Description
I built a bot using Bot Framework (node.js) with four connected channels (Messenger, Telegram, Skype and Web). At any moment the bot validates an inputted email address using a regular expression like this below:
/^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$/i
It is working properly on all channels, except the Skype. E.g: gcfabri@gmail.com match with this regex but on Skype channel it doesn’t happens.
Code Example
emailRegex.test(
gcfabri@gmail.com);
Expected Behavior
The email address gcfabri@gmail.com should match with the regex above.
Actual Results
Skype channel just ignore the step with the regex validation.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
In this Skype web control generator, typing an email address ...
If user types some regular expression like (*** Email address is removed for privacy ***) then the line isn't showing in the chat...
Read more >Bot Framework Skype channel regular expressions not working
It is working properly on all channels, except the Skype. E.g: gcfabri@gmail.com match with this regex but on Skype channel it doesn't happens....
Read more >Skype's Crazy Regex Easter Egg | Hacker News
Some experimentation shows that it isn't a full regular expression engine, it will only do straight word substitution. I think this is stretching...
Read more >What is the full extent of s/old/new and /find in Skype commands ...
1 Answer 1 · 1 · @Arjan, sorry, I was trying to say that a lot of blog posts about this feature seem...
Read more >skype-connect-troubleshooting-guide.pdf
3.2 You have Quality of Service (QoS) issues ... Skype Connect™, account management and billing queries by email or chat. ... message's telephone-event....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @gcfabri - You need to verify that the content being returned by Skype channel is actually a plain-text email address. Sometimes Skype wraps email addresses in HTML tags, so you would need to adjust your RegEx accordingly.
On Skype channel you need to check for:
<a href="mailto:name@email.com">name@email.com</a>
Hi All,
I was facing the same issue and I found the below regular express which resolved my issue.
@“\b(?!mailto:)([\w-]+(.[\w-]+)@([a-z0-9-]+(.[a-z0-9-]+)?.[a-z]{2,6}|(\d{1,3}.){3}\d{1,3})(:\d{4})?)”
Thanks