C/C++の宿題片付けます 152代目
■ このスレッドは過去ログ倉庫に格納されています
0125111
2011/08/04(木) 23:30:41.97#include<iostream>
#include<string>
#include<boost/xpressive/xpressive.hpp>
using namespace std;
using namespace boost::xpressive;
int main(){
string target = "CCAGCUCCC-G---U--UGGG";
smatch m;
sregex pattern = sregex::compile("C[-]*G[-]*U[-]*U");
if(regex_search(target,m,pattern)){
cout << "CGUU is " << m.position() << endl;
}
}
■ このスレッドは過去ログ倉庫に格納されています