is-posix-bracket NPM version NPM downloads Build Status

Returns true if the given string is a POSIX bracket expression (POSIX character class).

Install

Install with npm:

sh $ npm install is-posix-bracket --save

Usage

```js var isPosixBracket = require('is-posix-bracket');

isPosixBracket('[foo:]]'); //=> false isPosixBracket('[xdigit:]]'); //=> false isPosixBracket('[[:xdigit:]]'); //=> true isPosixBracket('[[:xdigit:]]'); //=> true isPosixBracket('[[:alpha:]123]'); //=> true isPosixBracket('[[:alpha:]123]'); //=> true isPosixBracket('[a-c[:digit:]x-z]'); //=> true isPosixBracket('[:al:]'); //=> true isPosixBracket('[abc[:punct:][0-9]'); //=> true ```

Related projects

You might also be interested in these projects:

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Building docs

Generate readme and API documentation with verb:

sh $ npm install verb && npm run docs

Or, if verb is installed globally:

sh $ verb

Running tests

Install dev dependencies:

sh $ npm install -d && npm test

Author

Jon Schlinkert

License

Copyright © 2016, Jon Schlinkert. Released under the MIT license.


This file was generated by verb, v, on April 05, 2016.