punctuation-regex
Version:
Regular expression for matching punctuation characters.
72 lines (44 loc) • 3.32 kB
Markdown
# punctuation-regex [](https://www.npmjs.com/package/punctuation-regex) [](https://npmjs.org/package/punctuation-regex) [](https://npmjs.org/package/punctuation-regex) [](https://travis-ci.org/regexhq/punctuation-regex)
> Regular expression for matching punctuation characters.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save punctuation-regex
```
See the [wikipedia punctuation](https://en.wikipedia.org/wiki/Punctuation) article for more details.
## Usage
```js
var punctuation = require('punctuation-regex');
// the main export is a function that must be called
console.log(punctuation().test('!'));
//=> true
```
## About
### Related projects
* [is-punctuation](https://www.npmjs.com/package/is-punctuation): Returns true if the given string is punctuation characters. | [homepage](https://github.com/jonschlinkert/is-punctuation "Returns true if the given string is punctuation characters.")
* [path-root-regex](https://www.npmjs.com/package/path-root-regex): Regular expression for getting the root of a posix or windows filepath. | [homepage](https://github.com/regexhq/path-root-regex "Regular expression for getting the root of a posix or windows filepath.")
* [whitespace-regex](https://www.npmjs.com/package/whitespace-regex): Regular expression for matching the whitespace in a string. | [homepage](https://github.com/regexps/whitespace-regex "Regular expression for matching the whitespace in a string.")
* [word-regex](https://www.npmjs.com/package/word-regex): Regular expression for matching words in a string. Support for english, CJK and Cyrillic. | [homepage](https://github.com/regexps/word-regex "Regular expression for matching words in a string. Support for english, CJK and Cyrillic.")
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
Please read the [contributing guide](.github/contributing.md) for avice on opening issues, pull requests, and coding standards.
### Building docs
_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
```sh
$ npm install -g verb verb-generate-readme && verb
```
### Running tests
Install dev dependencies:
```sh
$ npm install -d && npm test
```
### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
### License
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT license](LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.3, on January 04, 2017._