SOURCE

const reg1 = /(^\(\d*\))/;
//匹配(1)开头
let s1 = '(22)测试文本'
console.log(s1.replace(reg1, ''))

const reg2 = /^([1-9]\w*[、||.])/
//匹配18、18.
let s2 = '12.测试文本'
console.log(s2.replace(reg2, ''))

//匹配 二十一、呼吸系统疾病病人的护理'
let str3='二十一、呼吸系统疾病病人的护理'
let a = ['一', '二', '三', '四', '五', '六', '七', '八', '九']
let arr = []
for (let i = 0; i < a.length; i++) {
    const element = a[i];
    if (i != 0) {
        arr.push(element + '十')
    } else {
        arr.push('十')
    }

    for (let j = 0; j < a.length; j++) {
        const element2 = a[j];
        if (i == 0) {
            const num = '十' + element2
            arr.push(num)
        } else {
            const num = element + '十' + element2
            arr.push(num)
        }
    }
}
arr = arr.concat(a);
let s_reg3 = arr.join('|');
let reg3str = '^(' + s_reg3 + ')\w*[、|。|.|\s]'
const reg3 = new RegExp(reg3str);
//匹配 二十一、呼吸系统疾病病人的护理'
str3 = str3.replace(reg3, '')
console.log(str3)
console 命令行工具 X clear

                    
>
console