update regular expression pattern