-
-
Save CyberLight/251ffd905084a6cc19266211a4390a1e to your computer and use it in GitHub Desktop.
List of punctuation characters
This file contains hidden or 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