-
-
Save nashid/5e7b64c4c74f56cc446e11a578950a15 to your computer and use it in GitHub Desktop.
List of punctuation characters
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 PUNCTUATION = "" + | |
"’'" + // apostrophe | |
"()[]{}<>" + // brackets | |
":" + // colon | |
"," + // comma | |
"‒–—―" + // dashes | |
"…" + // ellipsis | |
"!" + // exclamation mark | |
"." + // full stop/period | |
"«»" + // guillemets | |
"-‐" + // hyphen | |
"?" + // question mark | |
"‘’“”" + // quotation marks | |
";" + // semicolon | |
"/" + // slash/stroke | |
"⁄" + // solidus | |
"␠" + // space? | |
"·" + // interpunct | |
"&" + // ampersand | |
"@" + // at sign | |
"*" + // asterisk | |
"\\" + // backslash | |
"•" + // bullet | |
"^" + // caret | |
"¤¢$€£¥₩₪" + // currency | |
"†‡" + // dagger | |
"°" + // degree | |
"¡" + // inverted exclamation point | |
"¿" + // inverted question mark | |
"¬" + // negation | |
"#" + // number sign (hashtag) | |
"№" + // numero sign () | |
"%‰‱" + // percent and related signs | |
"¶" + // pilcrow | |
"′" + // prime | |
"§" + // section sign | |
"~" + // tilde/swung dash | |
"¨" + // umlaut/diaeresis | |
"_" + // underscore/understrike | |
"|¦" + // vertical/pipe/broken bar | |
"⁂" + // asterism | |
"☞" + // index/fist | |
"∴" + // therefore sign | |
"‽" + // interrobang | |
"※" // reference mark | |
// escape punctuation characters for regular expression | |
PUNCTUATION = PUNCTUATION.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment