Learning and matching human activities using regular expressions