Replaced the filtering with regular expressions