You need to write code that will evaluate the extraction criteria and determine if an account satisfies the criteria or not.
the application for which is written is completely irrelevant for the logic involved
You need to do it... not us.
and.... honestly don' t You feel that You are expecting too much for the people willing to answer with good advice
what You ask for is not something to which we can reply quickly , but it something that will take quite a bit of time and lots of experience
to understand the requirement and analyze to provide a good advice
anyway the best approach is to write a parser and a scanner for the evaluation of a logical expression
even the format of the criteria is quite primitive ...
the OR+ is just a sheer stupidity, much smarter to provide for Parenthesized parser to take care of the proper operator priorities
it can be easily written in c with the aid of yacc/bison for the parsing
in pl/I rexx with hand written parsers, not too difficult, if You know how to do it