QT += coreQT -= guiTARGET = TestCONFIG += consoleCONFIG -= app_bundleTEMPLATE = appINCLUDEPATH+="D:/EXE/C++/boost_1_46_1"SOURCES += main.cppLIBS += D:/EXE/C++/boost_1_46_1/bin.v2/libs/regex/build/msvc-10.0/release/link-static/threading-multi/libboost_regex-vc100-mt-1_46_1.libLIBS += -LD:/EXE/C++/boost_1_46_1/bin.v2/libs/regex/build/msvc-10.0/release/link-static/threading-multi -llibboost_regex-vc100-mt-1_46_1
#include <boost/regex.hpp>#include <iostream>#include <string>int main(){ std::string line; boost::regex pat( "^Subject: (Re: |Aw: )*(.*)" ); while (std::cin) { std::getline(std::cin, line); boost::smatch matches; if (boost::regex_match(line, matches, pat)) std::cout << matches[2] << std::endl; } return 0;}
QFileInfo f("d:\\vstup.py");QFile::copy(f.absoluteFilePath(),QDir("d:\\test_qt").absolutePath()) ? std::cout<<"ok" : std::cout<<"bad";
C++ (Qt)QRegExp re("USERPROFILE=(.+),");re.setMinimal(true);QString userprofile;if (rx.indexIn(QProcess::systemEnvironment().join(",")) > -1) userprofile = rx.cap(1);
C++ (Qt)QFileInfo f("d:/vstup.py");QFile::copy(f.absoluteFilePath(), QString("d:/test_qt/%1").arg(f.fileName())) ? std::cout<<"ok" : std::cout<<"bad";