any-rule icon indicating copy to clipboard operation
any-rule copied to clipboard

我有一个正则表达式的问题,请教各位一下,匹配昵称

Open xs-411 opened this issue 2 years ago • 1 comments

^[A-Za-z0-9_\u4e00-\u9fa5]{5,10}$ 匹配中文和数字和字母 希望可以将一个中文当成一个字符来限制。 abc一二三 : 6个字符 可实际一个中文3个字节组成,就导致匹配失败,如何把中文三个字节看成一个规则呢?

xs-411 avatar Aug 12 '22 05:08 xs-411

@cpp-user 中文是3-4个字节

xjq7 avatar Aug 17 '22 02:08 xjq7