我有以下僅允許字母的正則表達式: /[a-zA-Z]+/ a = "abcDF" if (a.match(/[a-zA-Z]+/) == a){ //Match }else{ //No Match } 如何使用p {L}(通用-任何語言,例如德語,英語等)來執行此操作我試過了 a.match(/[p{l}]+/) a.match(/[\p{l}]+/) a.match(/p{l}/) a.match(/\p{l}/)但所有字母a =“ aB”均返回null
僅匹配unicode字母
qq_花開花謝_0
2019-12-06 11:09:40