QString file_data = ТЕКСТ_ДЛЯ_ПАРСИНГА;QRegExp reg_exp("\\[\\[(.+)\s+(.+)\\]\\]");int pos = 0;while((pos = reg_exp.indexIn(file_data, pos)) != -1) { QString res = "<a href=\"" + reg_exp.cap(1) + "\">" + reg_exp.cap(2) + "</a>"; file_data.replace(pos, res.length(), res); pos += reg_exp.matchedLength();}
C++ (Qt)QRegExp re;re.setMinimal(true);
QRegExp b("\\'\\'\\'(.+)\\'\\'\\'"); b.setMinimal(true); while(b.indexIn(conv) != -1){ QString bb = "<b>"+b.cap(1)+"</b>"; QString exbb = b.cap(0); conv.replace(exbb, bb); }