let pattern = /^[u4e00-u9fa5]{1,10}$/g; //检测1-10位汉字 pattern.test('啊啊啊啊啊'); let pattern = /^[u4e00-u9fa5]{1,250}$/g; //检测1-250位汉字 pattern.test('啊啊啊啊啊');
548k questions
547k answers
4 comments
86.3k users