Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8327477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:07:27+00:00 2026-06-09T01:07:27+00:00

I have some boost Regex code which I think should fire. I’m new to

  • 0

I have some boost Regex code which I think should fire. I’m new to boost but I know a little bit of Regex. Here’s the code that I’m using.

re = boost::basic_regex<TCHAR>(_T("-+\\s+Original\\s+Message\\s+-+"), boost::regex_constants::icase);
boost::match_results<TSTRING::const_iterator> result;
if(boost::regex_match(RawBody, result, re))

and here is the test string I’m using.

this is a test

-------- Original Message --------

everything under here should disappear

My code compiles and runs, it just doesn’t trigger the if statement. I tried debugging into the boost code and … yeah…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T01:07:29+00:00Added an answer on June 9, 2026 at 1:07 am

    regex_match

    The algorithm regex_match determines whether a given regular
    expression matches all of a given character sequence denoted by a pair
    of bidirectional-iterators
    , the algorithm is defined as follows, the
    main use of this function is data input validation.

    regex_search

    The algorithm regex_search will search a range denoted by a pair of
    bidirectional-iterators for a given regular expression.
    The algorithm
    uses various heuristics to reduce the search time by only checking for
    a match if a match could conceivably start at that position. The
    algorithm is defined as follows:

    So, use boost::regex_search. Example.

    http://liveworkspace.org/code/fa35778995c4bd1e191c785671ab94b6

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some socket connection code that makes use of boost::asio which reads from
I have some C++ code #include <cstdio> #include <boost/bind.hpp> #include <boost/function.hpp> class A {
I have a function called PreProcessSource, which allocates a boost::wave::context and does some preprocessing;
I have some class which uses boost singleton. It calls some function from own
I have some predefined type which inherits boost::noncopyable (so I have to store the
I'm new to the Boost.MPL library, and have some beginners-problems Look at this sample:
I need to map a delete ptrAddr; to a boost::function0 but i have some
I have some boost python classes, which I instantiate in python. I want to
I have some issue with boost::asio::async_read Here's my code void TCPConnection::listenForRead() { boost::asio::async_read(m_socket, boost::asio::buffer(m_inbound_data),
I have some code that I want to build. The code uses boost::ptr_map class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.