filter design pattern using regular expression