试了试
- [color=#008ef1]QString test;[/color]
 -     QRegExp reg("(?<=2010)k");
 -     test = QString("2010k");
 -     qDebug()<<test.indexOf(reg);
 -     test = QString("2012k");
 -     qDebug()<<test.indexOf(reg);
 
返回两个-1 同样的代码 换成QRegularExpression倒是可以 返回4、-1 不过QTextDocument的find函数
没有接口 自己写又很麻烦