# unicoderegexp

> Regular expressions for various Unicode character classes extracted from XRegExp

Latest version **0.4.1** (published 2015-08-20) · 0 weekly downloads

## Install

```sh
npm install unicoderegexp
pnpm add unicoderegexp
yarn add unicoderegexp
bun add unicoderegexp
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.1 |
| Published | 2015-08-20 |
| First published | 2013-12-13 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | papandreou, maartenwinter |
| Keywords | unicode, regular expression, regexp, regex, characters, printable |

## Links

- npm: https://www.npmjs.com/package/unicoderegexp
- Repository: https://github.com/One-com/unicoderegexp
- Homepage: https://github.com/One-com/unicoderegexp#readme
- Issues: https://github.com/One-com/unicoderegexp/issues
- npm.io page: https://npm.io/package/unicoderegexp

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 0.4.1 (latest) — 2015-08-20
- 0.4.0 — 2015-08-20
- 0.3.1 — 2015-08-07
- 0.3.0 — 2014-03-18
- 0.2.4 — 2014-03-17
- 0.2.3 — 2013-12-13
- 0.1.0 — 2013-12-13
- 0.2.0 — 2013-12-13
- 0.2.1 — 2013-12-13
- 0.2.2 — 2013-12-13

## README

unicoderegexp
=============

Various regular expressions for unicode character classes (letter,
punctuation, number, etc.) and helper functions for composing them.

Used by the [purify](https://github.com/One-com/purify) library.

The module exports a bunch of useful RegExps each with a single character class in them:

* `letter`
* `mark`
* `number`
* `punctuation`
* `symbol`
* `separator`
* `other`
* `visible`
* `printable`

```javascript
unicodeRegExp.visible.test("a"); // true
unicodeRegExp.visible.test(" "); // false
unicodeRegExp.visible.test("\u00a0"); // false -- a non-breaking space is not visible
```

To validate an entire string you need to build a new RegExp:

```javascript
var visibleStringRegExp = new RegExp('^' + unicodeRegExp.visible.source + '*$');
visibleStringRegExp.test("foobar"); // true
visibleStringRegExp.test("foo bar"); // false because of the space

unicodeRegExp.removeCharacterFromCharacterClassRegExp(/[æøå]/, 'æ'); // /[\u00f8\u00e5]/
unicodeRegExp.spliceCharacterClassRegExps(/[a-b]/, /[c-d]/); // /[a-bc-d]/
```

The info about which characters belong to which classes was taken from the
[XRegExp](http://xregexp.com/) library and its [Unicode plugin](http://xregexp.com/plugins/#unicode).

---
_Source: https://npm.io/package/unicoderegexp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
