如何提取字符串数字和字母
QString str = "9004-Ⅱ刀闸";将9004-Ⅱ提取出来
QString str2 = "902c手车刀闸";将902c提取出来
即把除汉字外的字符串提取出来,正则表达式怎么写?或者还有什么其他方式 --------------------编程问答-------------------- 我做过一个间隔绑定组件,跟你这个差不多,用正则表达式比较好做。 --------------------编程问答-------------------- 正则表达式怎么写呢? --------------------编程问答-------------------- QString str = "……、";
QRegExp rx("[^\u4e00-\u9fa5]");
bool match = rx.exactMatch(str);
if(match)
printf("match...\n");
else
printf("not match...");
--------------------编程问答-------------------- 楼上的犀利啊
补充:移动开发 , Qt