Boost logo

Boost :

From: Mayo (g17mayo_at_[hidden])
Date: 2001-06-06 16:31:41


I am developing an application that monitors net traffic and decodes
messages into readable text format.

The application needs to have a facility that can match individual
fields in the text form of the messages, in order to troubleshoot
problems in the system more easily. So I chose to use Dr. Maddock's
regex++ cause it seems to be easy to use and also offers a fast
matching algorithm something that is critical to what I am developing.

The problem I am facing is that although I use regex_match()
similarly with the example in the documantation, it seems that
regex_match() returns always false.

I use regex_match as follows:


/**> Code
 ** Usage of regex_match()
using namespace boost

regex match_ex("fieldX = Y");

bool MatchCheck( const::std string *message )

    if( regex_match(message.begin(), message.end(), what, match_ex,
        //do something
        //and return true
       //do something else
       //and return false


variable message is a buffer that holds the decoded message which is
in a following format.

     field1 = 1
     field2 = 2
     field3 = 3
     fieldn = n

I really can figure out why that always returns false there is
definately something I am missing. Unfortunately I am not very
familiar neither with regex++ nor with the GNU regular expression
library so I am a bit stuck.

I would greately appreciate any kind of help and pointers that can
help me identify the nature of the problem.


George P.

Boost list run by bdawes at, gregod at, cpdaniel at, john at