您好,欢迎来到666游戏网。
搜索
您的当前位置:首页oracle中文与数字正则实例代码

oracle中文与数字正则实例代码

来源:666游戏网


解决正则中文

public static int getlength(string strsource)
{
regex regex = new regex("[u4e00-u9fa5]+", regexoptions.compiled);
int nlength = strsource.length;

for (int i = 0; i < strsource.length; i++)
{
if (regex.ismatch(strsource.substring(i, 1)))
{
nlength++;
}
}

return nlength;
}

Copyright © 2019- 666spj.com 版权所有

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务