Skip to content

Instantly share code, notes, and snippets.

@Viktorminator
Created October 15, 2016 20:41
Show Gist options
  • Save Viktorminator/e42e50bac05aa7ee9328c2555dd164fa to your computer and use it in GitHub Desktop.
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
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