POSIX character classes for creating regular expressions.
Install with npm:
$ npm install --save posix-character-classes
Install with yarn:
$ yarn add posix-character-classes
var posix = require('posix-character-classes'); console.log(posix.alpha); //=> 'A-Za-z'
The POSIX standard supports the following classes or categories of charactersh (note that classes must be defined within brackets):
|POSIX class||Equivalent to||Matches|
| || ||digits, uppercase and lowercase letters|
| || ||upper- and lowercase letters|
| || ||ASCII characters|
| || ||space and TAB characters only|
| || ||Control characters|
| || ||digits|
| || ||graphic characters (all characters which have graphic representation)|
| || ||lowercase letters|
| || ||graphic characters and space|
| || ||all punctuation characters (all graphic characters except letters and digits)|
| || ||all blank (whitespace) characters, including spaces, tabs, new lines, carriage returns, form feeds, and vertical tabs|
| || ||uppercase letters|
| || ||word characters|
| || ||hexadecimal digits|
a[:digit:]bis invalid, character classes must be enclosed in brackets
[[:digit:]abc]matches any digit, as well as
[abc[:digit:]]is the same as the previous, matching any digit, as well as
[^ABZ[:lower:]]matches any character except lowercase letters,
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
This file was generated by verb-generate-readme, v0.5.0, on April 20, 2017.