Boox.Regex No matching function for regex_match

I was having a hard time getting a sample regex to work, the function I mean. Copying from examples (http://www.boost.org/doc/libs/1_42_0/libs/regex/doc/html/boost_regex/ref/regex_match.html) wasnt working and found an entry in the mailing list that didnt help my case (http://lists.boost.org/boost-users/2007/11/32214.php), so I was getting ready to post the question here, in doing so I started simplifying my code so it would be easier to understand what Ive tried and what I want to accomplish, gave a final go before posting and it worked! I had written so much of the post already felt like it was worth doing something with it any ways hehe

Well hopefully it will help others (or myself even) running into this in the future :)

Perhaps it would be even more helpful if you posted your original non-compiling code and your final code
that does compile. Otherwise just telling people you had a compile error and fixed it is hardly useful.
well the original code is the one from the link I posted, just the example at the end of that page, the code that did compile for me is here:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <string>
#include <stdio.h>
#include <iostream>
#include <algorithm>
//#include <regex>
#include <vector>
#include <boost/regex.hpp>
#include "Analyzer.h"
#include "Board.h"
using namespace std;

std::string Analyzer::getTag(string sFrom, string sTag) {
std::string sRegex("([Site])+");
boost::regex expression(sRegex);
    boost::smatch what;
    if (boost::regex_match(sFrom, what, expression))
    {
       
        cout << "-------------------anything-";
    }
    else{
        cout << "__What not " << sFrom << " < -- > " << expression << endl;
    }
    
Topic archived. No new replies allowed.