0

i am trying to use boost regex_match to check if astring is match of specific string in function bellow .

here is my code :

bool findCauseInIgnoreSet(string cause_name) {
    cout << "finding  ignore_cause " << cause_name << endl;

        boost::regex ignore_cause_regex("pll[0].lock_lost_counter");

        cout << "boost:regex ignore_cause_regex(*it) " <<  ignore_cause_regex <<endl;
        if (boost::regex_match(cause_name,ignore_cause_regex)) {
            cout << "we found a match for warning cause " << endl;
            return true;
        }
    }
    return false;

when i call findCauseInIgnoreSet("pll[0].lock_lost_counter") in my main function i never get match , is there any restriction regarding special chars like "[" or "_".

thanks in advance.

yonikohen
  • 11
  • 6

0 Answers0