added posibility to use regular expression, wrote behavior tests