Boost logo

Boost :

From: Mayo (g17mayo_at_[hidden])
Date: 2001-06-11 10:36:55


I still have some blank spots in my mind regarding regular

I was going through the documentation of regex++ but I could not find
a way of creating a regular expression that AND's two strings to be


Further to what I posted in msg# 12967.

A message that contains the fields that I am interested to search
looks like the following:

                  tx_seq_num = 3
                 ack_seq_num = 2
            active_link_flag = 1
          packet_stored_flag = 0
              to_device_type = 1
            to_device_number = 1
            from_device_type = 2
          from_device_number = 2
                 packet_type = 0
             packet_sub_type = 0
         packet_service_type = 0

I want to use a regular expression that can pick two separate fields
in the above message. For example I wish to search for messages that
include "tx_seq_num = 3" AND "ack_seq_num = 2" but I am not
interested to see messages that include only one of the two.

A way I thought was to use an ORed expression
i.e. "tx_seq_num=3|ack_seq_num = 2" (which works fine btw) and then
check [what] to see what was matched, if both fields were matched
then I want to see the message else discard it.

But I am not very sure if in that case the algorithm after finding
the first match tries to look for the second or returns true with the
first match (possibly for optimization issues).

I was also wondering what exactly is returned with [what] considering
that the above message with the ORed expression was a real case

Any help would be appreciated.




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