# cjk-regex

> regular expression for matching CJK text

Latest version **3.4.1** (published 2026-09-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install cjk-regex
pnpm add cjk-regex
yarn add cjk-regex
bun add cjk-regex
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

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

## Facts

| | |
|---|---|
| Version | 3.4.1 |
| Published | 2026-09-12 |
| First published | 2017-10-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 27 |
| Author | Ika |
| Maintainers | fisker, ikatyang |
| Keywords | cjk, regular-expression |

## Links

- npm: https://www.npmjs.com/package/cjk-regex
- Repository: https://github.com/ikatyang-collab/cjk-regex
- Homepage: https://github.com/ikatyang-collab/cjk-regex#readme
- Issues: https://github.com/ikatyang-collab/cjk-regex/issues
- npm.io page: https://npm.io/package/cjk-regex

## Recent versions

- 3.4.1 (latest) — 2026-09-12
- 3.4.0 — 2025-08-30
- 3.3.0 — 2025-03-10
- 3.2.1 — 2025-03-08
- 3.2.0 — 2025-03-07
- 3.1.0 — 2023-10-21
- 3.0.0 — 2023-07-09
- 2.0.1 — 2021-01-07
- 2.0.0 — 2018-03-22
- 1.0.2 — 2017-10-14
- 1.0.1 — 2017-10-13

## README

# cjk-regex

[![npm](https://img.shields.io/npm/v/cjk-regex.svg)](https://www.npmjs.com/package/cjk-regex)
[![build](https://img.shields.io/github/actions/workflow/status/ikatyang/cjk-regex/test.yml)](https://github.com/ikatyang/cjk-regex/actions?query=branch%3Amain)

regular expression for matching CJK text

[Changelog](https://github.com/ikatyang/cjk-regex/blob/main/CHANGELOG.md)

## Install

```sh
npm install cjk-regex
```

## Usage

```js
import * as cjk from 'cjk-regex'

const cjkCharset = cjk.all()
cjkCharset.toRegExp().test('a') //=> false
cjkCharset.toRegExp().test('。') //=> true
cjkCharset.toRegExp().test('中') //=> true

const cjkLetterCharset = cjk.letters()
cjkLetterCharset.toRegExp().test('a') //=> false
cjkLetterCharset.toRegExp().test('。') //=> false
cjkLetterCharset.toRegExp().test('中') //=> true

const cjkPunctuationCharset = cjk.punctuations()
cjkPunctuationCharset.toRegExp().test('a') //=> false
cjkPunctuationCharset.toRegExp().test('。') //=> true
cjkPunctuationCharset.toRegExp().test('中') //=> false
```

Returns a [Charset](https://github.com/ikatyang/regexp-util#charset).

## Development

```sh
# lint
pnpm run lint

# build
pnpm run build

# test
pnpm run test
```

## License

MIT © [Ika](https://github.com/ikatyang)

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