jeudi 17 octobre 2019

How to match a vector of regular expression with a one string?

If I want to verify one string is completely matches with the any one in the vector of strings then i will use

std::find(vectOfStrings.begin(), vectOfStrings.end(), "<targetString>") != v.end()

If the target string matches with any of the string in the vector then it will return true.

But what if i want to check one string is matches with any one of the vector of regular expressions? Is there any standard library i can use to make it work like std::find(vectOfRegExprsns.begin(), vectOfRegExprsns.end(), "<targetString>") != v.end()?

Any suggestions would be highly appreciated.

Aucun commentaire:

Enregistrer un commentaire