Created
October 15, 2016 20:41
-
-
Save Viktorminator/e42e50bac05aa7ee9328c2555dd164fa to your computer and use it in GitHub Desktop.
Exclamation marks series #3: Remove all exclamation marks from sentence except at the end
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
function remove(s){ | |
return s.replace(/!+([^!])/g, '$1') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment