111です。動きました!ありがとうございます!

#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;
}
}