Created
December 11, 2013 19:52
-
-
Save cgkio/7917235 to your computer and use it in GitHub Desktop.
Regex remove everything after @ (including @)
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
REGEX: Trim everything up to and including = | |
var text = "[email protected]"; | |
text = text.replace(/@.*$/,""); | |
console.log(text); | |
// results = "john" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment