add extend
This commit is contained in:
parent
f3cc95b629
commit
f4723761bf
4770
data-friendly.json
4770
data-friendly.json
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -5,10 +5,11 @@ const utils = require('../../utils');
|
|||||||
const input = fs.readFileSync(path.join(__dirname, './data.txt'), 'utf8')
|
const input = fs.readFileSync(path.join(__dirname, './data.txt'), 'utf8')
|
||||||
|
|
||||||
let list = input.trim().replace(/[\r\n a-zA-Z0-9-_~!@#$%^&*\(\)<>?:\"\{\},\.\/;'\[\]\|\\=+·!?【】()《》;:,。、…「」〔〕‘’“”»\t ©%→]/g, "")
|
let list = input.trim().replace(/[\r\n a-zA-Z0-9-_~!@#$%^&*\(\)<>?:\"\{\},\.\/;'\[\]\|\\=+·!?【】()《》;:,。、…「」〔〕‘’“”»\t ©%→]/g, "")
|
||||||
console.log(list)
|
|
||||||
console.log()
|
|
||||||
list = Array.from(new Set(list.split(''))).sort((a, b) => a.localeCompare(b)).join('')
|
list = Array.from(new Set(list.split(''))).sort((a, b) => a.localeCompare(b)).join('')
|
||||||
console.log(list)
|
// console.log(list)
|
||||||
|
fs.writeFileSync(path.join(__dirname, './output.txt'), list, 'utf8')
|
||||||
|
return
|
||||||
|
|
||||||
for (let word of list) {
|
for (let word of list) {
|
||||||
// 汉字
|
// 汉字
|
||||||
|
Loading…
Reference in New Issue
Block a user