用于匹配字符串,获取字符串~一个简单的示例
QString strTemp="[506,750]<0,0,0>作<0,200,0>词<200,200,0>:<400,200,0>艺<600,150,0>丹\n";
QRegExp reg("\\<\\d+,\\d+\\,\\d+\\>");
for(int pos=0;pos=reg.indexIn(strTemp,pos),pos>=0; pos+=reg.matchedLength())
{
qDebug()<<pos; //返回查找到序号
qDebug()<<reg.cap(0);//返回匹配到的字串
}
推荐文章:git慢 github慢 git加速 github加速 git clone 慢 github clone 慢 git下载慢 github 下载慢,终于找到个完美方案了
更多文章:http://blog.csdn.net/what951006?viewmode=list
powered by:小乌龟在大乌龟背上~