$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Mayo (g17mayo_at_[hidden])
Date: 2001-06-06 16:31:41
Hi,
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,   
match_default)
    {   
        //do something
        //and return true    
    }
    else
    {
       //do something else
       //and return false 
    }
}
----------------------------------------------------------------------
variable message is a buffer that holds the decoded message which is 
in a following format. 
-----------------------------
date:source_ip->dest_ip
     MESSAGE_TYPE
     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.
Regards,
George P.