Realization of functional pattern matching feature