generalized expression filter