Fix regular expression evaluation for system/user vars