https://github.com/regexhq/word-regex
Regular expression for matching words in a string. Support for english, CJK and Cyrillic.
https://github.com/regexhq/word-regex
regex regular-expression word
Last synced: 11 months ago
JSON representation
Regular expression for matching words in a string. Support for english, CJK and Cyrillic.
- Host: GitHub
- URL: https://github.com/regexhq/word-regex
- Owner: regexhq
- License: mit
- Created: 2015-09-22T09:39:40.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-09-12T09:49:16.000Z (almost 8 years ago)
- Last Synced: 2025-06-20T03:43:13.373Z (12 months ago)
- Topics: regex, regular-expression, word
- Language: JavaScript
- Size: 18.6 KB
- Stars: 18
- Watchers: 9
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# word-regex [](https://www.npmjs.com/package/word-regex) [](https://npmjs.org/package/word-regex) [](https://npmjs.org/package/word-regex) [](https://travis-ci.org/regexhq/word-regex)
> Regular expression for matching words in a string. Support for english, CJK and Cyrillic.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save word-regex
```
## Usage
```js
var regex = require('word-regex')();
'match words.'.match(regex);
//=> ['match', 'words']
'match words, again.'.match(regex);
//=> ['match', 'words', 'again']
```
## About
### Related projects
* [copyright-regex](https://www.npmjs.com/package/copyright-regex): Regex for matching and parsing copyright statements. | [homepage](https://github.com/regexps/copyright-regex "Regex for matching and parsing copyright statements.")
* [is-equal-regex](https://www.npmjs.com/package/is-equal-regex): Returns true if regular expression A is equal to regex B. Compares the expression and… [more](https://github.com/jonschlinkert/is-equal-regex) | [homepage](https://github.com/jonschlinkert/is-equal-regex "Returns true if regular expression A is equal to regex B. Compares the expression and flags.")
* [todo-regex](https://www.npmjs.com/package/todo-regex): Regular expression for matching TODO statements in a string. | [homepage](https://github.com/regexps/todo-regex "Regular expression for matching TODO statements in a string.")
* [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.")
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### 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 © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT license](https://github.com/regexps/word-regex/blob/master/LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on December 07, 2016._