implemented filtering using regex