0

I want to find messages which are matched with a user define pattern using C++ Code. The sample message is

8=FIX.4.4|9=70|35=A|34=1|49=SAM|52=20170124-02:55:47|56=SAM|98=0|108=300|141=Y|10=236|

This is FIX message.

I want to find out is a message is matched with user defined filter or not?

A sample filter is

(9=70 OR 35=A) AND 49=SAM

Is there any library for matching? I would have to say that I can change the format of filter, but I need to support AND, OR , = , ()

Cœur
  • 37,241
  • 25
  • 195
  • 267
Sam Mokari
  • 461
  • 3
  • 11

1 Answers1

1

Sam!

I believe that you can use standard cpp regular expression library to solve this problem that way. And here is small guidance how to build your AND/OR conditions.

Community
  • 1
  • 1
rimas
  • 757
  • 2
  • 8
  • 18
  • Thanks for your answer, in this case, I am looking for a solution for parsing the filter. And there are several methods for parsing FIX messages. – Sam Mokari Jan 26 '17 at 23:16
  • Same regular expression library perfectly feet here too. Yes, it will be more sophisticated, comparable to the FIX parsing but still applicable. – rimas Jan 27 '17 at 05:37