CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1

    how to process string with boost::sregex_iterator in reverse order

    usually we do
    Code:
    boost::sregex_iterator itrBeginPath(alltext.begin(), alltext.end(), patternPath);
    but i have match condition and need to get closest previous appearance of some info, i dont know how to do it with greedy matching, but i can do it if reverse string and condition before search. But reversing expensive operation. Can i iterate througth my string from end to begin? How? Thanks.

  2. #2
    Join Date
    Nov 2008
    Location
    England
    Posts
    748

    Re: how to process string with boost::sregex_iterator in reverse order

    Use rbegin() and rend()
    Get Microsoft Visual C++ Express here or CodeBlocks here.
    Get STLFilt here to radically improve error messages when using the STL.
    Get these two can't live without C++ libraries, BOOST here and Loki here.
    Check your code with the Comeau Compiler and FlexeLint for standards compliance and some subtle errors.
    Always use [code] code tags [/code] to make code legible and preserve indentation.
    Do not ask for help writing destructive software such as viruses, gamehacks, keyloggers and the suchlike.

  3. #3

    Re: how to process string with boost::sregex_iterator in reverse order

    it said:
    cannot convert parameter 1 from 'std::reverse_iterator<_RanIt>' to 'std::_String_const_iterator<_Elem,_Traits,_Alloc>
    ((

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured