Last active
March 26, 2017 21:19
-
-
Save davistrent/08ac2ec1eaa6006b79d8a4a11eb967bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var re = /#(foo|bar|baz)/i; | |
var message = '@bot #bAz'; | |
var tagAttributes = message.match(re); | |
var tag = tagAttributes[1].toLowerCase(); | |
console.log(tag); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment