regexp-range
TypeScript icon, indicating that this package has built-in type declarations

2.0.7 • Public • Published

regexp-range

create regex class range string [一-十] [⓪-㊿] ...

install

npm i regexp-range

demo

import matchRange, { TABLE_RANGE } from 'regexp-range';

//console.log(TABLE_RANGE);

console.dir(matchRange('⓪', '㊿')); // => ['⓪' ... '㊿']
console.dir(matchRange('一', '十')); // => [ '一', '二', '三', '四', '五', '六', '七', '八', '九', '十' ]
console.dir(matchRange('零', '拾')); // => [ '零', '壱', '弐', '参', '肆', '伍', '陸', '柒', '捌', '玖', '拾' ]

console.dir(matchRange('二', '七', {
	createRegExpString: true,
})); // => '二三四五六七'
console.dir(matchRange('二', '七', {
	createRegExpString: true,
	createRegExpClass: true,
})); // => '[二三四五六七]'

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.0.7342latest

Version History

VersionDownloads (Last 7 Days)Published
2.0.7342
2.0.60
2.0.5256
2.0.413
2.0.35
2.0.20
2.0.10
1.0.40646
1.0.380
1.0.360
1.0.310
1.0.300
1.0.290
1.0.260
1.0.247
1.0.230
1.0.220
1.0.213
1.0.200
1.0.18147
1.0.170
1.0.160
1.0.150
1.0.140
1.0.120
1.0.110
1.0.100
1.0.90
1.0.81
1.0.7121
1.0.60
1.0.50
1.0.40
1.0.357
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i regexp-range

Weekly Downloads

1,598

Version

2.0.7

License

ISC

Unpacked Size

65.2 kB

Total Files

19

Last publish

Collaborators

  • bluelovers