<Using VC7.0> I'm converting to V4 of Regex, and I thought I might be able to count regex matches using this snippet: boost::regex e; std::string::const_iterator first, last; //Initialize first, last boost::sregex_iterator itBegin(first, last, e) boost::sregex_iterator itEnd; ptrdiff_t pd = std::distance(itBegin, itEnd); I get these errors: xutility(312) : error C2665: 'std::_Iter_cat' : none of the 12 overloads can convert parameter 1 from type 'boost::sregex_iterator' xutility(127): could be 'std::_Int_iterator_tag std:: _Iter_cat(std::_Bool)' xutility(133): or 'std::_Int_iterator_tag std:: _Iter_cat(char)' xutility(139): or 'std::_Int_iterator_tag std:: _Iter_cat(signed char)' xutility(145): or 'std::_Int_iterator_tag std:: _Iter_cat(unsigned char)' xutility(151): or 'std::_Int_iterator_tag std:: _Iter_cat(short)' xutility(157): or 'std::_Int_iterator_tag std:: _Iter_cat(unsigned short)' xutility(163): or 'std::_Int_iterator_tag std:: _Iter_cat(int)' xutility(169): or 'std::_Int_iterator_tag std:: _Iter_cat(unsigned int)' xutility(175): or 'std::_Int_iterator_tag std:: _Iter_cat(long)' xutility(181): or 'std::_Int_iterator_tag std:: _Iter_cat(unsigned long)' xutility(188): or 'std::_Int_iterator_tag std::_Iter_cat (__int64)' xutility(194): or 'std::_Int_iterator_tag std:: _Iter_cat(unsigned __int64)' while trying to match the argument list '(boost::sregex_iterator)' myfile.h(47) : see reference to function template instantiation 'ptrdiff_t std::distance(_InIt,boost::sregex_iterator)' being compiled with [ _InIt=boost::sregex_iterator ] Anyone have any thoughts? Is it a VC7.0 issue? Is there a better or different way of doing the same thing? -------------------------------- John Wismar jwismar@midsouth.rr.com ------------------------------------------------------------------------ The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.