What part of the filtering do you want to know about?
The actual filter selection is likely to use regular expressions - a good regex implementation can be found in
Boost[
^].
If this is not the part that you don't understand then please clarify your question