Created
December 19, 2015 19:13
-
-
Save k-kurikuri/e48cab9d279bce46fbd2 to your computer and use it in GitHub Desktop.
Chatworkの[To:number] NameのNameを削除するJavascript
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 textArea = document.getElementById('_chatText'); | |
var replaced = textArea.value.replace(/\[To:\d*\](.*\n)/g, function (matchStr, groupStr) { | |
return matchStr.replace(groupStr, ''); | |
}); | |
textArea.value = replaced; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment