UNPKG

punctuation-regex

Version:

Regular expression for matching punctuation characters.

15 lines (12 loc) 432 B
/*! * punctuation-regex <https://github.com/regexps/punctuation-regex> * * Copyright (c) 2016 Jon Schlinkert. * Licensed under the MIT license. */ 'use strict'; module.exports = function(extended) { return extended === true ? /^[\‒\–\—\―|$&~=\\\/⁄@+*!?({[\]})<>‹›«».;:^‘’“”'",،、`·\•†‡°″¡¿※#№÷×%‰\−‱¶′‴§_‖¦]+$/ : /^[!"#$%&'()*+,./:;<=>?@\^_`{|}~\-]+$/; };