mercredi 24 décembre 2014

C++ std::regex. Error in searching substring by regular expression

I'm using Visual Studio Express 2012.


I wrote function what search substrings in string by regular expressin. It work well, but after here is no more matching substrings in string, i get error:



Expression: string iterator not dereferencable



I match this way:



std::smatch m;
std::regex rExp("[a-z][a-z0-9]*");
strBuf = "*10.5)*51E-10";
while (std::regex_search (strBuf, m, rExp)) {...


In main() it works fine, but as it heppens in function error message pops up.


Full code: http://ift.tt/1AHABOg


Aucun commentaire:

Enregistrer un commentaire