Regexp should be created in the filter function and not at the caller; it depends on the filter whether this is a necessary step or not.
The CSV metadata reference has to be made available for filters