update regular expression matching