Update with option to allow pattern matching in addition to string matching